omppLog

package
Version: v1.9.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 7, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package omppLog to println messages to standard output and log file. It is intended for progress or error logging and should not be used for profiling (it is slow).

Log can be enabled/disabled for two independent streams:

console  => standard output stream
log file => log file, truncated on every run, (optional) unique "stamped" name

"Stamped" file name produced by adding time-stamp and/or pid-stamp, i.e.:

exeName.log => exeName.2012_08_17_16_04_59_148.123.log

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Log

func Log(msg ...interface{})

Log message to console and log file

func LogIfTime added in v1.9.7

func LogIfTime(lastT int64, periodSec int64, msg ...interface{}) int64

LogIfTime do Log(msg) not more often then every periodSec seconds. It does nothing if now time < lastT + periodSec. Time is a Unix time, seconds since epoch.

func LogSql

func LogSql(sql string)

LogSql sql query to file

func New

func New(opts *config.LogOptions)

New log settings

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL