Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
e39bd1dd
Commit
e39bd1dd
authored
Oct 15, 2010
by
Rob Pike
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
log: roll back the rollback of the deprecation of the old interface.
R=adg CC=golang-dev
https://golang.org/cl/2521042
parent
6e18e8c8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
40 deletions
+1
-40
log.go
src/pkg/log/log.go
+1
-40
No files found.
src/pkg/log/log.go
View file @
e39bd1dd
...
@@ -49,10 +49,7 @@ func New(out io.Writer, prefix string, flag int) *Logger {
...
@@ -49,10 +49,7 @@ func New(out io.Writer, prefix string, flag int) *Logger {
return
&
Logger
{
out
,
prefix
,
flag
}
return
&
Logger
{
out
,
prefix
,
flag
}
}
}
var
(
var
std
=
New
(
os
.
Stderr
,
""
,
Ldate
|
Ltime
)
std
=
New
(
os
.
Stderr
,
""
,
Ldate
|
Ltime
)
stdout
=
New
(
os
.
Stdout
,
""
,
Ldate
|
Ltime
)
// Deprecated.
)
// Cheap integer to fixed-width decimal ASCII. Give a negative width to avoid zero-padding.
// Cheap integer to fixed-width decimal ASCII. Give a negative width to avoid zero-padding.
// Knows the buffer has capacity.
// Knows the buffer has capacity.
...
@@ -224,39 +221,3 @@ func Panicln(v ...interface{}) {
...
@@ -224,39 +221,3 @@ func Panicln(v ...interface{}) {
std
.
Output
(
2
,
s
)
std
.
Output
(
2
,
s
)
panic
(
s
)
panic
(
s
)
}
}
// Everything from here on is deprecated and will be removed after the next release.
// Logf is analogous to Printf() for a Logger.
// Deprecated.
func
(
l
*
Logger
)
Logf
(
format
string
,
v
...
interface
{})
{
l
.
Output
(
2
,
fmt
.
Sprintf
(
format
,
v
...
))
}
// Log is analogous to Print() for a Logger.
// Deprecated.
func
(
l
*
Logger
)
Log
(
v
...
interface
{})
{
l
.
Output
(
2
,
fmt
.
Sprintln
(
v
...
))
}
// Stdout is a helper function for easy logging to stdout. It is analogous to Print().
// Deprecated.
func
Stdout
(
v
...
interface
{})
{
stdout
.
Output
(
2
,
fmt
.
Sprint
(
v
...
))
}
// Stderr is a helper function for easy logging to stderr. It is analogous to Fprint(os.Stderr).
// Deprecated.
func
Stderr
(
v
...
interface
{})
{
std
.
Output
(
2
,
fmt
.
Sprintln
(
v
...
))
}
// Stdoutf is a helper functions for easy formatted logging to stdout. It is analogous to Printf().
// Deprecated.
func
Stdoutf
(
format
string
,
v
...
interface
{})
{
stdout
.
Output
(
2
,
fmt
.
Sprintf
(
format
,
v
...
))
}
// Stderrf is a helper function for easy formatted logging to stderr. It is analogous to Fprintf(os.Stderr).
// Deprecated.
func
Stderrf
(
format
string
,
v
...
interface
{})
{
std
.
Output
(
2
,
fmt
.
Sprintf
(
format
,
v
...
))
}
// Crash is equivalent to Stderr() followed by a call to panic().
// Deprecated.
func
Crash
(
v
...
interface
{})
{
Panicln
(
v
...
)
}
// Crashf is equivalent to Stderrf() followed by a call to panic().
// Deprecated.
func
Crashf
(
format
string
,
v
...
interface
{})
{
Panicf
(
format
,
v
...
)
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment