You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now Output is restricted to IO and StringIO objects, what would be more ideal is the ability to use an arbitrary Object as long as it implements a common interface.
Use Case
Given an application that requires logging to a database
Then Logsaber can write out each chunk of information to specified columns
This requires two parts:
A formatter that returns a list/dictionary instead of a string
A standard output object interface
The text was updated successfully, but these errors were encountered:
To go into more detail, Logsaber uses the standard IO interface of print/puts/write/close. This functionality should be moved to an IOAdapter object that is passed the raw information given to Logsaber by the logging method and wraps the basic functionality of outputting to IO and loading IO formatters. An ObjectAdapter type would do the same, but instead output whatever objects dictated by the Object formatters. For example a simple OStruct formatter would be useful for other parts of the system to parse and potentially auto-heal based on errors encountered in other places of the application without halting execution.
This commit finally separates the main intelligent logging element from the text log generation: 5824f58
There's still no way to specify formatters and it will probably be ideal to pass the Entry instance into the formatter so that everything can be lazy evaled as needed.
Right now Output is restricted to
IO
andStringIO
objects, what would be more ideal is the ability to use an arbitrary Object as long as it implements a common interface.Use Case
This requires two parts:
The text was updated successfully, but these errors were encountered: