Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
黄成意
/
go_sku_server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
1fe10cbe
authored
Dec 01, 2020
by
huangchengyi
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
1.0
parent
c0158858
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletions
pkg/logger/mylog.go
pkg/logger/mylog.go
View file @
1fe10cbe
...
@@ -39,7 +39,7 @@ func Log(writeString string,log_file_pre string,types int) {
...
@@ -39,7 +39,7 @@ func Log(writeString string,log_file_pre string,types int) {
var
f
*
os
.
File
var
f
*
os
.
File
var
err1
error
var
err1
error
if
checkFileIsExist
(
filename
)
{
//如果文件存在
if
checkFileIsExist
(
filename
)
{
//如果文件存在
f
,
err1
=
os
.
OpenFile
(
filename
,
os
.
O_APPEND
,
0666
)
//打开文件
f
,
err1
=
os
.
OpenFile
(
filename
,
os
.
O_APPEND
|
os
.
O_WRONLY
|
os
.
O_CREATE
,
0755
)
}
else
{
}
else
{
f
,
err1
=
os
.
Create
(
filename
)
//创建文件
f
,
err1
=
os
.
Create
(
filename
)
//创建文件
}
}
...
@@ -49,6 +49,7 @@ func Log(writeString string,log_file_pre string,types int) {
...
@@ -49,6 +49,7 @@ func Log(writeString string,log_file_pre string,types int) {
if
types
==
1
{
if
types
==
1
{
fmt
.
Print
(
writeString
)
fmt
.
Print
(
writeString
)
}
}
defer
f
.
Close
()
//fmt.Print(err)
//fmt.Print(err)
}
}
...
...
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