Force log when trace is enabled
Enable force logging for all log statements when a trace for a REST call or a Git push is requested. Force logging means that all log statements will be written to the error log regardless of the severity of the log statement and the configured log levels. This allows to get more information about single requests and makes debugging them easier. Change-Id: Id13556d8ee25bbc91a44d58177b771e22043106f Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
@@ -53,7 +53,7 @@ public abstract class SshCommand extends BaseCommand {
|
||||
if (trace) {
|
||||
RequestId traceId = new RequestId();
|
||||
stderr.println(String.format("%s: %s", RequestId.Type.TRACE_ID, traceId));
|
||||
return TraceContext.open().addTag(RequestId.Type.TRACE_ID, traceId);
|
||||
return TraceContext.open().forceLogging().addTag(RequestId.Type.TRACE_ID, traceId);
|
||||
}
|
||||
return TraceContext.DISABLED;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user