Skip to content

Instantly share code, notes, and snippets.

@drm317
Last active March 8, 2016 20:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drm317/90aeede3bedd9b69b43f to your computer and use it in GitHub Desktop.
Save drm317/90aeede3bedd9b69b43f to your computer and use it in GitHub Desktop.
Software Craftmanship 2016 - Mini Project
Roll your own logging framework
Estimated Duration: 1-2 hours
Author: Daniel Marlow
Language(s)/stacks: Any
Summary:
Bootstrap a logging framework via TDD using your chosen programming language.
Write a logging framework that will allow you to append to a rolling log file or the console in your chosen programming language.
It should have the following basic features:
1. Allow you to append to a log file or the console.
2. Option to specify a maximum log file size before a new file is created.
3. Accept a configurable filter level to determine the log levels to publish.
4. Handle ERROR, WARN and INFO log levels.
5. Accept a configurable location for log files.
More advanced features if you have the time:
6. Allow custom-formatted log entries including the date and time.
7. Filter to restrict logging to certain times of the day.
8. Automatically detect configuration changes from a configuration file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment