Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Sharkey
Manage
Activity
Members
Labels
Plan
Issues
337
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
25
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TransFem.org
Sharkey
Commits
d12d201e
Commit
d12d201e
authored
6 years ago
by
Aya Morisawa
Browse files
Options
Downloads
Patches
Plain Diff
Update logger
parent
c91a4c9d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/misc/logger.ts
+11
-10
11 additions, 10 deletions
src/misc/logger.ts
with
11 additions
and
10 deletions
src/misc/logger.ts
+
11
−
10
View file @
d12d201e
...
...
@@ -21,32 +21,33 @@ export default class Logger {
(
new
Logger
(
''
)).
warn
(
message
);
}
public
static
info
(
message
:
string
):
void
{
(
new
Logger
(
''
)).
info
(
message
);
}
public
static
succ
(
message
:
string
):
void
{
(
new
Logger
(
''
)).
succ
(
message
);
}
public
static
info
(
message
:
string
):
void
{
(
new
Logger
(
''
)).
info
(
message
);
}
public
log
(
level
:
string
,
message
:
string
)
{
const
domain
=
this
.
domain
.
length
>
0
?
`[
${
this
.
domain
}
] `
:
''
;
Logger
.
log
(
level
,
`
${
domain
}${
message
}
`
);
}
public
error
(
message
:
string
):
void
{
public
error
(
message
:
string
):
void
{
// 実行を継続できない状況で使う
this
.
log
(
chalk
.
red
.
bold
(
'
ERROR
'
),
chalk
.
red
.
bold
(
message
));
}
public
warn
(
message
:
string
):
void
{
public
warn
(
message
:
string
):
void
{
// 実行を継続できるが改善すべき状況で使う
this
.
log
(
chalk
.
yellow
.
bold
(
'
WARN
'
),
chalk
.
yellow
.
bold
(
message
));
}
public
info
(
message
:
string
):
void
{
this
.
log
(
chalk
.
blue
.
bold
(
'
INFO
'
),
message
);
public
succ
(
message
:
string
):
void
{
// 何かに成功した状況で使う
this
.
log
(
chalk
.
blue
.
bold
(
'
INFO
'
),
chalk
.
green
.
bold
(
message
)
)
;
}
public
succ
(
message
:
string
):
void
{
this
.
log
(
chalk
.
blue
.
bold
(
'
INFO
'
),
chalk
.
green
.
bold
(
message
)
)
;
public
info
(
message
:
string
):
void
{
// それ以外
this
.
log
(
chalk
.
blue
.
bold
(
'
INFO
'
),
message
);
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment