Logging double, until refresh
See original GitHub issueHaai,
So i’m using Hangfire.Console, and while keeping the page open looking at the realtime updates (amazing) - it’s logging all entries twice for some reason. see below:
If I refresh the page, the doubles are gone - so it only happens for new entries whilst I keep the page open.
This is the logging call:
// set color according to "level"
context.SetTextColor(
// warning
level == LogLevel.Warning
? ConsoleTextColor.DarkYellow
// error OR critical
: level == LogLevel.Error || level == LogLevel.Critical
? ConsoleTextColor.Red
// Trace
: level == LogLevel.Trace
? ConsoleTextColor.Gray
// Info/Debug
: ConsoleTextColor.White
);
context.WriteLine($"{msg}");
context.ResetTextColor();
Any ideas if this is a bug or an issue on my side?
Issue Analytics
- State:
- Created 6 years ago
- Comments:16 (8 by maintainers)
Top Results From Across the Web
Duplicate log output when using Python logging module
The problem is that every time you call myLogger() , it's adding another handler to the instance, which causes the duplicate logs.
Read more >Logging Cookbook — Python 3.11.4 documentation
This page contains a number of recipes related to logging, which have been found ... until Ctrl+C is pressed while True: logger.debug('debug message') ......
Read more >Created task appears in double until refresh [HELP] : r/clickup
Hello, So I'm creating an organisational system in Clickup for my company and I'm currently transferring a lot of tasks from an old...
Read more >Python Logging Best Practices: The Ultimate Guide
Read about Python logging best practices and how to get the best log monitoring setup for your organization. Learn what Python logging is ......
Read more >8 Advanced Python Logging Features that You Shouldn't ...
Python provides a quite powerful and flexible built-in logging module with many advanced features. In this article, I want to share 8 advanced ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Haai,
Yeah, almost thought I was being retarded… I had it twice,
once:
And:
… but I removed the first one from the above, but it still does the same as before.
I think I will add a guard against calling
UseConsole
twice in the next version.