Package org.nustaq.kontraktor.util
Class Log
- All Implemented Interfaces:
Serializable
,Executor
,Monitorable
Created by ruedi on 24.08.14.
A wrapper for logging + metrics. This logger facade is asynchronous (so does not block by IO).
In order to redirect logging, use Log.Lg.setLogWrapper( .. );
Note its possible to log to a remote host using kontraktor remoting as the core logging class
is an actor.
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.nustaq.kontraktor.Actor
Actor.ActorReport
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static Log
static final int
Fields inherited from class org.nustaq.kontraktor.Actor
__cbQueue, __clientConnection, __connections, __currentDispatcher, __mailbox, __mailboxCapacity, __mbCapacity, __publishTarget, __remoteId, __scheduler, __self, __stopped, __ticketMachine, connection, sender, userData, zzRoutingGCEnabled, zzServerMsgCallback
Fields inherited from class org.nustaq.kontraktor.Actors
CONT, DEFAULT_TIMOUT, defaultScheduler, delayedCalls, exec, instance, MAX_EXTERNAL_THREADS_POOL_SIZE, version
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
static void
static void
static void
void
void
static void
static void
static void
int
void
static void
static void
static void
void
void
void
protected Log
self()
use this to call public methods using actor-dispatch instead of direct in-thread call.static int
setLevel
(int level) Sets the logging level to the specified value.void
setLogWrapper
(Log.LogWrapper delegate) void
setSeverity
(int severity) static void
void
static void
static void
static void
void
Methods inherited from class org.nustaq.kontraktor.Actor
__addDeadLetter, __addRemoteConnection, __addStopHandler, __dispatchRemoteCall, __enqueueCall, __getCachedMethod, __removeRemoteConnection, __stop, __stopImpl, __submit, ask, askMsg, asyncstop, checkThread, close, closeCurrentClient, current, cyclic, debounce, delayed, execInThreadPool, execute, getActor, getActorRef, getCallbackSize, getConnections, getCurrentDispatcher, getFactory, getMailboxSize, getQSizes, getReport, getScheduler, getSubMonitorables, getUntypedRef, hasStopped, inside, inThread, isCallbackQPressured, isEmpty, isMailboxPressured, isProxy, isPublished, isRemote, isStopped, ping, router$clientPing, serialOn, setServerMsgCallback, stop, stopSafeClose, tell, tellMsg, unpublish, zzkrouterLostClient, zzRoutingRefGC
Methods inherited from class org.nustaq.kontraktor.Actors
AddDeadLetter, all, all, all, allMapped, AsActor, AsActor, AsActor, AsActor, AsUntypedActor, awaitAll, awaitAll, awaitAll, awaitAll, complete, complete, DeadLetters, flow, InThread, isComplete, isCont, isError, isErrorOrComplete, isResult, isTimeout, kYield, kYield, promise, race, race, reject, resolve, resolve, stream, SubmitDelayed, yieldCallbacks
-
Field Details
-
DEBUG
public static final int DEBUG- See Also:
-
INFO
public static final int INFO- See Also:
-
WARN
public static final int WARN- See Also:
-
ERROR
public static final int ERROR- See Also:
-
Lg
-
defaultLogger
-
-
Constructor Details
-
Log
public Log()
-
-
Method Details
-
SetSynchronous
public static void SetSynchronous() -
setLevel
public static int setLevel(int level) Sets the logging level to the specified value.- Parameters:
level
- = Log.DEBUG | Log.INFO | Log.WARN | Log.ERROR- Returns:
- the previously set severity
-
Info
-
Info
-
Debug
-
Debug
-
Debug
-
Info
-
Warn
-
Warn
-
Warn
-
Error
-
Error
-
Error
-
setLogWrapper
-
setSeverity
public void setSeverity(int severity) -
self
Description copied from class:Actor
use this to call public methods using actor-dispatch instead of direct in-thread call. Important: When passing references out of your actor, always pass 'self()' instead of this ! -
getSeverity
public int getSeverity() -
resetToSysout
public void resetToSysout() -
infoLong
-
debug
-
debugLong
-
info
-
warnLong
-
warn
-
error
-
msg
-