-
-
Notifications
You must be signed in to change notification settings - Fork 357
Logging and user interaction
pjf edited this page Oct 12, 2014
·
1 revision
The CKAN 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
log4netgenerously:-
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--debugimplies--verbose. -
log.Warn(),log.Error()andlog.Fatal()will always be logged. - All
log4netfunctions come with formatted versions. Eg:log.DebugFormat()orlog.WarnFormat().
-
Contact us on the KSP forum or on our Discord server