Module: stdgo.log
Overview
Index
-
function benchmarkConcurrent(_b:stdgo._internal.testing.B):Void
-
function benchmarkDiscard(_b:stdgo._internal.testing.B):Void
-
function benchmarkPrintln(_b:stdgo._internal.testing.B):Void
-
function benchmarkPrintlnNoFlags(_b:stdgo._internal.testing.B):Void
-
function fatalf(_format:String, _v:haxe.Rest<stdgo.AnyInterface>):Void
-
function new_(_out:stdgo._internal.io.Writer, _prefix:String, _flag:Int):stdgo.log.Logger
-
function panicf(_format:String, _v:haxe.Rest<stdgo.AnyInterface>):Void
-
function printf(_format:String, _v:haxe.Rest<stdgo.AnyInterface>):Void
-
function testEmptyPrintCreatesLine(_t:stdgo._internal.testing.T_):Void
-
function testFlagAndPrefixSetting(_t:stdgo._internal.testing.T_):Void
-
function testNonNewLogger(_t:stdgo._internal.testing.T_):Void
Constants
import stdgo.log.Log
final ldate:haxe.UInt64 = stdgo._internal.log.Log_ldate.ldate
final llongfile:stdgo.GoUInt64 = stdgo._internal.log.Log_llongfile.llongfile
final lmicroseconds:stdgo.GoUInt64 = stdgo._internal.log.Log_lmicroseconds.lmicroseconds
final lmsgprefix:stdgo.GoUInt64 = stdgo._internal.log.Log_lmsgprefix.lmsgprefix
final lshortfile:stdgo.GoUInt64 = stdgo._internal.log.Log_lshortfile.lshortfile
final lstdFlags:haxe.UInt64 = stdgo._internal.log.Log_lstdFlags.lstdFlags
final ltime:stdgo.GoUInt64 = stdgo._internal.log.Log_ltime.ltime
final lutc:stdgo.GoUInt64 = stdgo._internal.log.Log_lutc.lutc
final rdate:String = stdgo._internal.log.Log_rdate.rdate
final rline:String = stdgo._internal.log.Log_rline.rline
final rlongfile:String = stdgo._internal.log.Log_rlongfile.rlongfile
final rmicroseconds:String = stdgo._internal.log.Log_rmicroseconds.rmicroseconds
final rshortfile:String = stdgo._internal.log.Log_rshortfile.rshortfile
final rtime:String = stdgo._internal.log.Log_rtime.rtime
Classes
import stdgo.log.*
class Log
Package log implements a simple logging package. It defines a type, Logger,
with methods for formatting output. It also has a predefined 'standard'
Logger accessible through helper functions Print[f|ln], Fatal[f|ln], and
Panic[f|ln], which are easier to use than creating a Logger manually.
That logger writes to standard error and prints the date and time
of each logged message.
Every log message is output on a separate line: if the message being
printed does not end in a newline, the logger will add one.
The Fatal functions call os.Exit(1) after writing the log message.
The Panic functions call panic after writing the log message.
Log function benchmarkConcurrent
function benchmarkConcurrent(_b:stdgo._internal.testing.B):Void
Log function benchmarkDiscard
function benchmarkDiscard(_b:stdgo._internal.testing.B):Void
Log function benchmarkItoa
function benchmarkItoa(_b:stdgo._internal.testing.B):Void
Log function benchmarkPrintln
function benchmarkPrintln(_b:stdgo._internal.testing.B):Void
Log function benchmarkPrintlnNoFlags
function benchmarkPrintlnNoFlags(_b:stdgo._internal.testing.B):Void
Log function default_
function default_():stdgo.log.Logger
Default returns the standard logger used by the package-level output functions.
Log function fatal
function fatal(_v:haxe.Rest<stdgo.AnyInterface>):Void
Fatal is equivalent to Print() followed by a call to os.Exit(1).
Log function fatalf
function fatalf(_format:String, _v:haxe.Rest<stdgo.AnyInterface>):Void
Fatalf is equivalent to Printf() followed by a call to os.Exit(1).
Log function fatalln
function fatalln(_v:haxe.Rest<stdgo.AnyInterface>):Void
Fatalln is equivalent to Println() followed by a call to os.Exit(1).
Log function flags
function flags():Int
Flags returns the output flags for the standard logger.
The flag bits are Ldate, Ltime, and so on.
Log function new_
function new_(_out:stdgo._internal.io.Writer, _prefix:String, _flag:Int):stdgo.log.Logger
New creates a new Logger. The out variable sets the
destination to which log data will be written.
The prefix appears at the beginning of each generated log line, or
after the log header if the Lmsgprefix flag is provided.
The flag argument defines the logging properties.
Log function output
function output(_calldepth:Int, _s:String):stdgo.Error
Output writes the output for a logging event. The string s contains
the text to print after the prefix specified by the flags of the
Logger. A newline is appended if the last character of s is not
already a newline. Calldepth is the count of the number of
frames to skip when computing the file name and line number
if Llongfile or Lshortfile is set; a value of 1 will print the details
for the caller of Output.
Log function panic
function panic(_v:haxe.Rest<stdgo.AnyInterface>):Void
Panic is equivalent to Print() followed by a call to panic().
Log function panicf
function panicf(_format:String, _v:haxe.Rest<stdgo.AnyInterface>):Void
Panicf is equivalent to Printf() followed by a call to panic().
Log function panicln
function panicln(_v:haxe.Rest<stdgo.AnyInterface>):Void
Panicln is equivalent to Println() followed by a call to panic().
Log function prefix
function prefix():String
Prefix returns the output prefix for the standard logger.
Log function print
function print(_v:haxe.Rest<stdgo.AnyInterface>):Void
Print calls Output to print to the standard logger.
Arguments are handled in the manner of fmt.Print.
Log function printf
function printf(_format:String, _v:haxe.Rest<stdgo.AnyInterface>):Void
Printf calls Output to print to the standard logger.
Arguments are handled in the manner of fmt.Printf.
Log function println
function println(_v:haxe.Rest<stdgo.AnyInterface>):Void
Println calls Output to print to the standard logger.
Arguments are handled in the manner of fmt.Println.
Log function setFlags
function setFlags(_flag:Int):Void
SetFlags sets the output flags for the standard logger.
The flag bits are Ldate, Ltime, and so on.
Log function setOutput
function setOutput(_w:stdgo._internal.io.Writer):Void
SetOutput sets the output destination for the standard logger.
Log function setPrefix
function setPrefix(_prefix:String):Void
SetPrefix sets the output prefix for the standard logger.
Log function testAll
function testAll(_t:stdgo._internal.testing.T_):Void
Log function testDefault
function testDefault(_t:stdgo._internal.testing.T_):Void
Log function testDiscard
function testDiscard(_t:stdgo._internal.testing.T_):Void
Log function testEmptyPrintCreatesLine
function testEmptyPrintCreatesLine(_t:stdgo._internal.testing.T_):Void
Log function testFlagAndPrefixSetting
function testFlagAndPrefixSetting(_t:stdgo._internal.testing.T_):Void
Log function testNonNewLogger
function testNonNewLogger(_t:stdgo._internal.testing.T_):Void
Log function testOutput
function testOutput(_t:stdgo._internal.testing.T_):Void
Log function testOutputRace
function testOutputRace(_t:stdgo._internal.testing.T_):Void
Log function testUTCFlag
function testUTCFlag(_t:stdgo._internal.testing.T_):Void
Log function writer
function writer():stdgo._internal.io.Writer
Writer returns the output destination for the standard logger.