-
Notifications
You must be signed in to change notification settings - Fork 0
Logging and user interaction
Piotr Stankowski edited this page May 15, 2016
·
2 revisions
The CFAN core is intended to be reusable across multiple clients, including consoles, native and web-based GUIs, and batch processes.
- Use
User.WriteLine()
rather thanConsole.WriteLine()
. You should only useConsole.WriteLine()
if you know there is going to be a console. - Use
log4net
generously:-
log.Debug()
for matters that will of only be interest to developers (--debug
), andlog.Info()
for matters that users may find interesting when running with--verbose
. Note that--debug
implies--verbose
. -
log.Warn()
,log.Error()
andlog.Fatal()
will always be logged. - All
log4net
functions come with formatted versions. Eg:log.DebugFormat()
orlog.WarnFormat()
.
-