sys: golang.org/x/sys/windows/svc/debug Index | Files

package debug

import "golang.org/x/sys/windows/svc/debug"

Package debug provides facilities to execute svc.Handler on console.

Index

Package Files

log.go service.go

func Run

func Run(name string, handler svc.Handler) error

Run executes service name by calling appropriate handler function. The process is running on console, unlike real service. Use Ctrl+C to send "Stop" command to your service.

type ConsoleLog

type ConsoleLog struct {
    Name string
}

ConsoleLog provides access to the console.

func New

func New(source string) *ConsoleLog

New creates new ConsoleLog.

func (*ConsoleLog) Close

func (l *ConsoleLog) Close() error

Close closes console log l.

func (*ConsoleLog) Error

func (l *ConsoleLog) Error(eid uint32, msg string) error

Error writes an error event msg with event id eid to the console l.

func (*ConsoleLog) Info

func (l *ConsoleLog) Info(eid uint32, msg string) error

Info writes an information event msg with event id eid to the console l.

func (*ConsoleLog) Warning

func (l *ConsoleLog) Warning(eid uint32, msg string) error

Warning writes an warning event msg with event id eid to the console l.

type Log

type Log interface {
    Close() error
    Info(eid uint32, msg string) error
    Warning(eid uint32, msg string) error
    Error(eid uint32, msg string) error
}

Log interface allows different log implementations to be used.

Package debug imports 5 packages (graph) and is imported by 4 packages. Updated 4 days ago with GOOS=windows. Refresh now. Tools for package owners.