staradmin.exe
and via star.exe
.staradmin.exe
. Type staradmin list --max=50 log
to see the 50 most recent log entries.staradmin list log
will show you the 25 latest logged entries with severity Notice
and higher (i.e. including Warning
and Error
, but not Debug
).Notice
and up), type staradmin list --max=all log
.Debug
, type staradmin log --max=100 debug
.Notice
and up), type staradmin list --max=all log
.Debug
, type staradmin list --max=100 log debug
.staradmin list --max=all log errors
staradmin list --max=20 log warnings
.staradmin --max=50 list log all Starcounter
.staradmin list log
can be filtered by a named database by applying the global -d
option. For example, to see the 10 last entries from the Starcounter.Host
source, logging from within the default
database, type staradmin -d=default list --max=10 log all Starcounter.Host
.star.exe
to display log entries scoped to the operation star executes, for example starting an application. You do this using the new --logs option.star --logs app.exe
will first start "app.exe" and then output all log entries that was written to the log from the time when the command was invoked. By default, logs with Notice
and up is displayed. To see debug logs too, instead type star --verbose --logs app.exe
.C:\Users\[YourName]\Documents\Starcounter\Personal
.C:\Users\[YourName]\Documents\Starcounter\[Version]\Personal
Logs
subdirectory.Starcounter.[nnnnnnnnnn].log
where [nnnnnnnnnn] is an opaque sequence number used by Starcounter. If you see several files, the one with the highest number contains the most recent entries.LogSource
class, part of the Starcounter.Logging
namespace.star app.cs
, viewing the logged entry can be done with the staradmin list log
command, using staradmin list log all PerSamuelsson
.LogSource
class has support for logging errors (critical, text, and from exceptions), warnings and notices. Invoking any of the corresponding LogSource
methods, such as LogWarning
above, will assure the message ends up in the log.Debug
and Trace
methods respectively. Logging using the Debug
method will only be available in Starcounter versions built with the DEBUG configuration. Similarly, logging using the Trace
method will only be available in Starcounter versions built with the TRACE configuration.Debug
severity. Trace logging is an experimental feature and should not be considered future compatible. It is driven by an environment variable, SC_ENABLE_TRACE_LOGGING
. To set this flag and thereby effectively enable trace logging for a set of Starcounter components, make sure all Starcounter processes are stopped and apply the --tracelogging
flag to scservice.exe
.