Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F665634
logger.ex
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
665 B
Subscribers
None
logger.ex
View Options
defmodule
ExIrc.Logger
do
@moduledoc
"""
A simple abstraction of :error_logger
"""
@doc
"""
Log an informational message report
"""
@spec
info
(
binary
)
::
:ok
def
info
(
msg
)
do
:error_logger
.
info_report
String
.
to_char_list!
(
msg
)
end
@doc
"""
Log a warning message report
"""
@spec
warning
(
binary
)
::
:ok
def
warning
(
msg
)
do
:error_logger
.
warning_report
String
.
to_char_list!
(
"
#{
IO.ANSI
.
yellow
()
}#{
msg
}#{
IO.ANSI
.
reset
()
}
"
)
end
@doc
"""
Log an error message report
"""
@spec
error
(
binary
)
::
:ok
def
error
(
msg
)
do
:error_logger
.
error_report
String
.
to_char_list!
(
"
#{
IO.ANSI
.
red
()
}#{
msg
}#{
IO.ANSI
.
reset
()
}
"
)
end
end
File Metadata
Details
Attached
Mime Type
text/x-ruby
Expires
Sat, Feb 28, 3:23 AM (4 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
87363
Default Alt Text
logger.ex (665 B)
Attached To
rEXIRC ExIRC Fork
Event Timeline
Log In to Comment