public final class LoggerMethods extends Object
Martini
.Modifier and Type | Method and Description |
---|---|
static String |
debug(String message)
Gets a logger named
Martini and then sends a debug message to it. |
static String |
debug(String loggerName,
String message) |
static String |
debugIfEnabled(String message)
Gets a logger named
Martini and then sends a debug message to it (if debug is enabled). |
static String |
debugIfEnabled(String loggerName,
String message) |
static String |
error(String message)
Gets a logger named
Martini and then sends a error message to it. |
static String |
error(String loggerName,
String message) |
static String |
error(String loggerName,
String message,
Throwable throwable) |
static String |
error(String message,
Throwable throwable)
Gets a logger named
Martini and then sends a error message and exception to it. |
static String |
errorIfEnabled(String message)
Gets a logger named
Martini and then sends a error message to it (if error is enabled). |
static String |
errorIfEnabled(String loggerName,
String message) |
static String |
errorIfEnabled(String loggerName,
String message,
Throwable throwable) |
static String |
errorIfEnabled(String message,
Throwable throwable)
Gets a logger named
Martini and then sends a error message and exception to it (if error is
enabled). |
static String |
info(String message)
Gets a logger named
Martini and then sends an info message to it. |
static String |
info(String loggerName,
String message) |
static String |
infoIfEnabled(String message)
Gets a logger named
Martini and then sends an info message to it (if info is enabled). |
static String |
infoIfEnabled(String loggerName,
String message) |
ApplicationLogger |
logger()
Gets a logger named
groovy which allows groovy scripts to log to the underlying Martini Runtime
logger |
static ApplicationLogger |
logger(Class clazz)
Gets a logger which allows groovy scripts to log to the underlying Martini Runtime logger
|
static ApplicationLogger |
logger(String scriptName)
Gets a logger which allows groovy scripts to log to the underlying Martini Runtime logger
|
static String |
logTo(String message,
String scriptName)
Gets a logger which allows groovy scripts to log to the underlying Martini Runtime logger
|
static String |
print(String message) |
static String |
println(String message) |
static String |
trace(String message)
Gets a logger named
Martini and then sends a trace message to it. |
static String |
trace(String loggerName,
String message) |
static String |
traceIfEnabled(String message)
Gets a logger named
Martini and then sends a trace message to it (if trace is enabled). |
static String |
traceIfEnabled(String loggerName,
String message) |
static String |
warn(String message)
Gets a logger named
Martini and then sends a warn message to it. |
static String |
warn(String loggerName,
String message) |
static String |
warnIfEnabled(String message)
Gets a logger named
Martini and then sends a warn message to it (if warn is enabled). |
static String |
warnIfEnabled(String loggerName,
String message) |
@GloopComment(value="Print a string to System.out") public static String print(String message)
@GloopComment(value="Println a string to System.out") public static String println(@GloopParameter(value="Message to print to System.out") String message)
public static ApplicationLogger logger(String scriptName)
Gets a logger which allows groovy scripts to log to the underlying Martini Runtime logger
Example usage:
def logger = 'scriptName'.logger() logger.info( "This is an example info log" );
scriptName
- The name to give to the loggerApplicationLogger
objectpublic static ApplicationLogger logger(Class clazz)
Gets a logger which allows groovy scripts to log to the underlying Martini Runtime logger
Example usage:
def logger = getClass().logger() logger.info( "This is an example info log" );
clazz
- The class to attach the logger toApplicationLogger
objectpublic ApplicationLogger logger()
Gets a logger named groovy
which allows groovy scripts to log to the underlying Martini Runtime
logger
Example usage:
def logger = logger() logger.info( "This is an example info log" );
ApplicationLogger
objectpublic static String logTo(String message, String scriptName)
Gets a logger which allows groovy scripts to log to the underlying Martini Runtime logger
Example usage:
'log message goes here'.logTo( 'my groovy logger' );
message
- The message to logscriptName
- The name of the logger@GloopComment(value="Send a trace message to the underlying log engine with category `Martini`") public static String trace(@GloopParameter(value="Message to print to log trace") String message)
Gets a logger named Martini
and then sends a trace message to it.
Logs will go to the underlying Martini Runtime logger
Example usage:
'message'.trace( );
@GloopComment(value="Send a trace message to the underlying log engine with category `<loggerName>`") public static String trace(@GloopParameter(value="Logger name",allowNull=false) String loggerName, @GloopParameter(value="Message to print to log trace") String message)
@GloopComment(value="Send a trace message to the underlying log engine with category `Martini`, if trace messages are enabled for the category") public static String traceIfEnabled(@GloopParameter(value="Message to print to log trace") String message)
Gets a logger named Martini
and then sends a trace message to it (if trace is enabled).
Logs will go to the underlying Martini Runtime logger.
Example usage:
'message'.traceIfEnabled( );
@GloopComment(value="Send a trace message to the underlying log engine with category `<loggerName>`, if trace messages are enabled for the category") public static String traceIfEnabled(@GloopParameter(value="Logger name",allowNull=false) String loggerName, @GloopParameter(value="Message to print to log trace") String message)
@GloopComment(value="Gets a logger named `Martini` and then sends a debug message to it") public static String debug(@GloopParameter(value="Message to print to log debug") String message)
Gets a logger named Martini
and then sends a debug message to it.
Logs will go to the underlying Martini Runtime logger
Example usage:
'message'.debug( );
@GloopComment(value="Send a debug message to the underlying log engine with category `<loggerName>`") public static String debug(@GloopParameter(value="Logger name",allowNull=false) String loggerName, @GloopParameter(value="Message to print to log debug") String message)
@GloopComment(value="Send a debug message to the underlying log engine with category `Martini`, if debug messages are enabled for the category") public static String debugIfEnabled(@GloopParameter(value="Message to print to log debug") String message)
Gets a logger named Martini
and then sends a debug message to it (if debug is enabled).
Logs will go to the underlying Martini Runtime logger
Example usage:
'message'.debugIfEnabled( );
@GloopComment(value="Send a debug message to the underlying log engine with category `<loggerName>`, if debug messages are enabled for the category") public static String debugIfEnabled(@GloopParameter(value="Logger name",allowNull=false) String loggerName, @GloopParameter(value="Message to print to log debug") String message)
@GloopComment(value="Send an info message to the underlying log engine with category `Martini`, if info messages are enabled for the category") public static String info(@GloopParameter(value="Message to print to log info") String message)
Gets a logger named Martini
and then sends an info message to it.
Logs will go to the underlying Martini Runtime logger
Example usage:
'message'.info( );
@GloopComment(value="Send an info message to the underlying log engine with category `<loggerName>`") public static String info(@GloopParameter(value="Logger name",allowNull=false) String loggerName, @GloopParameter(value="Message to print to log info") String message)
@GloopComment(value="Send an info message to the underlying log engine with category `Martini`, if info messages are enabled for the category") public static String infoIfEnabled(@GloopParameter(value="Message to print to log info") String message)
Gets a logger named Martini
and then sends an info message to it (if info is enabled).
Logs will go to the underlying Martini Runtime logger
Example usage:
'message'.infoIfEnabled( );
@GloopComment(value="Send an info message to the underlying log engine with category `<loggerName>`, if info messages are enabled for the category") public static String infoIfEnabled(@GloopParameter(value="Logger name",allowNull=false) String loggerName, @GloopParameter(value="Message to print to log info") String message)
@GloopComment(value="Send a warn message to the underlying log engine with category `Martini`") public static String warn(@GloopParameter(value="Message to print to log warn") String message)
Gets a logger named Martini
and then sends a warn message to it. Logs will go to the underlying
Martini Runtime logger
Example usage:
'message'.warn( );
@GloopComment(value="Send a warn message to the underlying log engine with category `<loggerName>`") public static String warn(@GloopParameter(value="Logger name",allowNull=false) String loggerName, @GloopParameter(value="Message to print to log warn") String message)
@GloopComment(value="Send a warn message to the underlying log engine with category `Martini`, if warn messages are enabled for the category") public static String warnIfEnabled(@GloopParameter(value="Message to print to log warn") String message)
Gets a logger named Martini
and then sends a warn message to it (if warn is enabled).
Logs will go to the underlying Martini Runtime logger
Example usage:
'message'.warnIfEnabled( );
@GloopComment(value="Send a warn message to the underlying log engine, if warn messages are enabled for loggerName") public static String warnIfEnabled(@GloopParameter(value="Logger name",allowNull=false) String loggerName, @GloopParameter(value="Message to print to log warn") String message)
@GloopComment(value="Send an error message to the underlying log engine with category `Martini`") public static String error(@GloopParameter(value="Message to print to log error") String message)
Gets a logger named Martini
and then sends a error message to it.
Logs will go to the underlying Martini Runtime logger
Example usage:
'message'.error( );
@GloopComment(value="Send an error message to the underlying log engine with category `<loggerName>`") public static String error(@GloopParameter(value="Logger name",allowNull=false) String loggerName, @GloopParameter(value="Message to print to log error") String message)
@GloopComment(value="Send an error message and exception to the underlying log engine") public static String error(@GloopParameter(value="Message to print to log error") String message, @GloopParameter(value="The exception (throwable) to log") Throwable throwable)
Gets a logger named Martini
and then sends a error message and exception to it. Logs will go to
the underlying Martini Runtime logger
Example usage:
'message'.error( exception );
@GloopComment(value="Send an error message and exception to the underlying log engine, if error messages are enabled for loggerName") public static String error(@GloopParameter(value="Logger name",allowNull=false) String loggerName, @GloopParameter(value="Message to print to log error") String message, @GloopParameter(value="The exception (throwable) to log") Throwable throwable)
@GloopComment(value="Send an error message to the underlying log engine with category `Martini`, if error messages are enabled for the category") public static String errorIfEnabled(@GloopParameter(value="Message to print to log error") String message)
Gets a logger named Martini
and then sends a error message to it (if error is enabled).
Logs will go to the underlying Martini Runtime logger
Example usage:
'message'.errorIfEnabled( );
@GloopComment(value="Send an error message to the underlying log engine with category `<loggerName>`, if error messages are enabled for the category") public static String errorIfEnabled(@GloopParameter(value="Logger name",allowNull=false) String loggerName, @GloopParameter(value="Message to print to log error") String message)
@GloopComment(value="Send an error message and exception to the underlying log engine, if error messages are enabled for category `Martini`") public static String errorIfEnabled(@GloopParameter(value="Message to print to log error") String message, @GloopParameter(value="The exception (throwable) to log") Throwable throwable)
Gets a logger named Martini
and then sends a error message and exception to it (if error is
enabled). Logs will go to the underlying Martini Runtime logger
Example usage:
'message'.errorIfEnabled( exception );
@GloopComment(value="Send an error message and exception to the underlying log engine, if error messages are enabled for loggerName") public static String errorIfEnabled(@GloopParameter(value="Logger name",allowNull=false) String loggerName, @GloopParameter(value="Message to print to log error") String message, @GloopParameter(value="The exception (throwable) to log") Throwable throwable)
Copyright © 2019. All rights reserved.