- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 11 for syslog_test (0.14 sec)
-
src/log/syslog/syslog_test.go
pri Priority pre string msg string exp string }{ {LOG_USER | LOG_ERR, "syslog_test", "", "%s %s syslog_test[%d]: \n"}, {LOG_USER | LOG_ERR, "syslog_test", "write test", "%s %s syslog_test[%d]: write test\n"}, // Write should not add \n if there already is one {LOG_USER | LOG_ERR, "syslog_test", "write test 2\n", "%s %s syslog_test[%d]: write test 2\n"}, } if hostname, err := os.Hostname(); err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 12 16:09:24 UTC 2023 - 9.6K bytes - Viewed (0) -
src/log/syslog/example_test.go
// Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build !windows && !plan9 package syslog_test import ( "fmt" "log" "log/syslog" ) func ExampleDial() { sysLog, err := syslog.Dial("tcp", "localhost:1234", syslog.LOG_WARNING|syslog.LOG_DAEMON, "demotag") if err != nil { log.Fatal(err) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 28 18:17:57 UTC 2021 - 541 bytes - Viewed (0) -
src/runtime/race/syso_test.go
Russ Cox <******@****.***> 1629910106 -0400
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 28 18:17:57 UTC 2021 - 725 bytes - Viewed (0) -
src/log/slog/example_test.go
// Copyright 2022 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package slog_test import ( "log/slog" "net/http" "os" "time" ) func ExampleGroup() { r, _ := http.NewRequest("GET", "localhost", nil) // ... logger := slog.New( slog.NewTextHandler(os.Stdout, &slog.HandlerOptions{
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Nov 17 14:56:30 UTC 2023 - 857 bytes - Viewed (0) -
src/log/slog/example_logvaluer_group_test.go
// Copyright 2022 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package slog_test import "log/slog" type Name struct { First, Last string } // LogValue implements slog.LogValuer. // It returns a group containing the fields of // the Name, so that they appear together in the log output. func (n Name) LogValue() slog.Value {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 21 20:55:33 UTC 2023 - 825 bytes - Viewed (0) -
src/log/slog/example_logvaluer_secret_test.go
// Copyright 2022 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package slog_test import ( "log/slog" "log/slog/internal/slogtest" "os" ) // A token is a secret value that grants permissions. type Token string // LogValue implements slog.LogValuer. // It avoids revealing the token. func (Token) LogValue() slog.Value {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 04 18:32:54 UTC 2023 - 906 bytes - Viewed (0) -
src/log/slog/example_wrap_test.go
// Copyright 2022 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package slog_test import ( "context" "fmt" "log/slog" "os" "path/filepath" "runtime" "time" ) // Infof is an example of a user-defined logging function that wraps slog. // The log record contains the source position of the caller of Infof.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 04 18:32:54 UTC 2023 - 1.3K bytes - Viewed (0) -
src/log/slog/example_log_level_test.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package slog_test import ( "log" "log/slog" "log/slog/internal/slogtest" "os" ) // This example shows how to use slog.SetLogLoggerLevel to change the minimal level // of the internal default handler for slog package before calling slog.SetDefault.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Nov 10 21:25:30 UTC 2023 - 1.9K bytes - Viewed (0) -
src/log/slog/example_custom_levels_test.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package slog_test import ( "context" "log/slog" "os" ) // This example demonstrates using custom log levels and custom log level names. // In addition to the default log levels, it introduces Trace, Notice, and
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jul 11 17:06:26 UTC 2023 - 3K bytes - Viewed (0) -
src/log/slog/example_level_handler_test.go
// Copyright 2022 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package slog_test import ( "context" "log/slog" "log/slog/internal/slogtest" "os" ) // A LevelHandler wraps a Handler with an Enabled method // that returns false for levels below a minimum. type LevelHandler struct { level slog.Leveler handler slog.Handler }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 04 18:32:54 UTC 2023 - 2.2K bytes - Viewed (0)