dart
dart copied to clipboard
Make logging redirectable
It would be useful if DART has logger that can print logs to files or console.
I think the dumb and easy thing to do is just keep streaming to cout
and cerr
and trust the user to redirect those streams if they want them redirected to a file. It's hard to think of another solution that doesn't involve either:
(1) Global extern variables for the logger objects, which would be hideous and terrible because global extern variables are hideous and terrible.
(2) Attaching logger object instances to every single DART object, which would be gross and unmanageable, because you'd have to redirect the logger of each object individually, or decide on some master/slave scheme that would probably be difficult to hash out.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.