dart icon indicating copy to clipboard operation
dart copied to clipboard

Make logging redirectable

Open jslee02 opened this issue 10 years ago • 2 comments

It would be useful if DART has logger that can print logs to files or console.

jslee02 avatar Nov 27 '14 00:11 jslee02

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.

mxgrey avatar Jul 03 '15 23:07 mxgrey

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.

stale[bot] avatar Feb 13 '18 19:02 stale[bot]