joshkeegan / klog.net Goto Github PK
View Code? Open in Web Editor NEWKLog.NET is a KISS .NET logging library
License: Other
KLog.NET is a KISS .NET logging library
License: Other
FileLog will perform the write on the thread that calls the Log write.
This could create unwanted performance problems in an application
The ColouredConsoleLog doesn't lock access to the console, so if there are several threads all writing to the Console at once with different log levels a message may appear half in one colour and half in another.
Could be solved with locking, but this would block the calling threads.
Could also solve with a separate thread responsible for writing things to the console log, similar to the plan for file logs.
Currently when any log.Error, Warn etc... gets called with any arguments for String.Format, it will format and then pass to the string logger. Should optimist to only calculate the string if actually going to log it
1.BlockWhileWriting() in c:\projects\klog-net\KLog\KLog\LogConcurrencyWrapper.cs:line 106 at KLog.LogConcurrencyWrapper
1.Dispose(Boolean disposing) in c:\projects\klog-net\KLog\KLog\LogConcurrencyWrapper.cs:line 130Full build output at: https://ci.appveyor.com/project/JoshKeegan/klog-net/build/0.1.65
Looks like the task is being canceled before its actually finished starting up (entered the Running state).
File log Rotation sometimes get stuck making new log files when there is no need for it to do so.
This happens once it's gone past the rotation point.
Happening in a highly multi-threaded environment.
Add an InternalLog (like DefaultLog) so that KLog can be used to debug itself
CompoundLog sets its LogLevel to LogLevel.All.
This means that Log.mayWriteLevel will always get passed LogLevel.All, so CompoundLog.write will always get called. This might not seem like a massive performance hit, but before writing to the CompoundLog, Log.tryWriteLevel will use getCallingFrame() which isn't very perforance friendly (see #10).
If I've thought this through properly, that means that in production applications (some of which are performance sensitive), we'll still be creating a StackTrace object for every Log.Debug call, even though the log level won't include debug.
Need to set up a perf test for this, but if it is causing problems should change it to calculate the maximum log level of all child logs and use that as the CompoundLog log level.
Assume will be the same for all log types, but has happened with DB.
When DB server is busy, unavailable or whatever and the transaction fails, will throw. Exception goes uncaught and propagates all the way up to the application, killing it.
Title says it all really
LogRateLimiter tests have been slowed down for Appveyor.
The time it waits is set in a constants at the top of LogRateLimiterTests.cs.
Make a PS script to perform the compilation rather than relying on the default appveyor stuff. This will let us pass a custom /define to the compiler, so the wait time can be set at compile time based on whether "appveyor" is defined.
Will still be slow on appveyor but will be quick elsewhere.
On travis, the build is now working with the new Release-mono-compat
configuration, but looking at the log, the unit tests fail.
Need to check if they run under mono usually.
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.IOException
Stack:
at System.Net.Sockets.NetworkStream.Read(Byte[], Int32, Int32)
at System.Net.PooledStream.Read(Byte[], Int32, Int32)
at System.Net.Mail.SmtpPooledStream.Dispose(Boolean)
at System.IO.Stream.Close()
at System.Net.ConnectionPool.Destroy(System.Net.PooledStream)
at System.Net.ConnectionPool.ForceCleanup()
at System.Net.ConnectionPoolManager.CleanupConnectionPool(System.Net.ServicePoint, System.String)
at System.Net.Mail.SmtpClient.Dispose(Boolean)
at KLog.EmailLog+<>c__DisplayClass1.b__0(System.Object, System.ComponentModel.AsyncCompletedEventArgs)
Log.getCallingFrame() makes a new StackTrace object which uses a lot of CPU (see screenshot)
Need to look into how that works, but I'm guessing the ctor gets the full StackTrace (all frames), when we only want the top one (that's meets our criteria).
If that's the case, this could be a major optimisation.
Upgrade unit tests to NUnit 3
A wrapper for a Log that can be used to filter out log messages.
Simple implementation would be to just have it take a delegate that takes a LogEntry and returns a bool, which is whether to actually write that LogEntry.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.