Package software.amazon.awssdk.crt
Class Log
- java.lang.Object
-
- software.amazon.awssdk.crt.Log
-
public class Log extends Object
Static wrapper around native and crt logging. It is NOT safe to change the logging setup after it has been initialized.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Log.LogLevel
Enum that controls how detailed logging should be.static class
Log.LogSubject
-
Constructor Summary
Constructors Constructor Description Log()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
initLoggingFromSystemProperties()
Examines logging-related system properties and initializes the logging system if they have been properly set.static void
initLoggingToFile(Log.LogLevel level, String filename)
Initializes logging to go to a filestatic void
initLoggingToStderr(Log.LogLevel level)
Initializes logging to go to stderrstatic void
initLoggingToStdout(Log.LogLevel level)
Initializes logging to go to stdoutstatic void
log(Log.LogLevel level, Log.LogSubject subject, String message)
Logs a message at the specified log level.
-
-
-
Method Detail
-
log
public static void log(Log.LogLevel level, Log.LogSubject subject, String message)
Logs a message at the specified log level.- Parameters:
level
- (for filtering purposes) level attached to the log invocationsubject
- (for filtering purposes) log subjectmessage
- log string to write
-
initLoggingFromSystemProperties
public static void initLoggingFromSystemProperties() throws IllegalArgumentException
Examines logging-related system properties and initializes the logging system if they have been properly set.- Throws:
IllegalArgumentException
-
initLoggingToStdout
public static void initLoggingToStdout(Log.LogLevel level)
Initializes logging to go to stdout- Parameters:
level
- the filter level to apply to log calls
-
initLoggingToStderr
public static void initLoggingToStderr(Log.LogLevel level)
Initializes logging to go to stderr- Parameters:
level
- the filter level to apply to log calls
-
initLoggingToFile
public static void initLoggingToFile(Log.LogLevel level, String filename)
Initializes logging to go to a file- Parameters:
level
- the filter level to apply to log callsfilename
- name of the file to direct logging to
-
-