public final class Log extends Object
xs:time
)Modifier and Type | Class and Description |
---|---|
static class |
Log.LogEntry
Log entry.
|
static class |
Log.LogType
Log types.
|
Modifier and Type | Field and Description |
---|---|
static String |
SERVER
Server string.
|
static String |
STANDALONE
Standalone string.
|
Constructor and Description |
---|
Log(StaticOptions sopts)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the log file.
|
IOFile |
dir()
Returns a reference to the log directory.
|
IOFile[] |
files()
Returns all log files.
|
void |
write(String address,
User user,
int type,
String info,
Performance perf)
Writes an entry to the log file.
|
void |
write(String address,
User user,
Log.LogType type,
String info,
Performance perf)
Writes an entry to the log file.
|
void |
writeServer(Log.LogType type,
String info)
Writes a server entry to the log file.
|
public static final String SERVER
public static final String STANDALONE
public Log(StaticOptions sopts)
sopts
- static optionspublic void writeServer(Log.LogType type, String info)
type
- log typeinfo
- info string (can be null
)public void write(String address, User user, int type, String info, Performance perf)
address
- address stringuser
- user (admin
if null)type
- type (HTTP status code)info
- info string (can be null
)perf
- performance stringpublic void write(String address, User user, Log.LogType type, String info, Performance perf)
address
- address stringuser
- user (admin
if null)type
- type (ERROR, OK, REQUEST, INFO)info
- info string (can be null
)perf
- performance stringpublic void close()
public IOFile dir()
public IOFile[] files()
Copyright © 2005–2015 BaseX Team. All rights reserved.