Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
cloogle.org
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Cloogle
cloogle.org
Commits
a7d79746
Verified
Commit
a7d79746
authored
Apr 26, 2016
by
Camil Staps
🚀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Timestamps in log
parent
c1e59406
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
CloogleServer.icl
CloogleServer.icl
+8
-1
No files found.
CloogleServer.icl
View file @
a7d79746
...
...
@@ -12,6 +12,9 @@ import Text.JSON
import
Data
.
Functor
import
Control
.
Applicative
from
Control
.
Monad
import
class
Monad
(..)
import
Text
import
System
.
Time
import
qualified
StdMaybe
as
OldMaybe
from
SimpleTCPServer
import
::
LogMessage
{..},
serve
,
::
Logger
...
...
@@ -141,9 +144,13 @@ where
log
::
(
LogMessage
(
Maybe
Command
)
Response
)
IPAddress
*
World
->
*(
IPAddress
,
*
World
)
log
msg
s
w
|
not
needslog
=
(
newS
msg
s
,
w
)
#
(
tm
,
w
)
=
localTime
w
#
(
io
,
w
)
=
stdio
w
#
io
=
fwrites
(
msgToString
msg
s
)
io
#
io
=
io
<<<
trim
(
toString
tm
)
<<<
" "
<<<
msgToString
msg
s
=
(
newS
msg
s
,
snd
(
fclose
io
w
))
where
needslog
=
case
msg
of
(
Received
_)
=
True
;
(
Sent
_)
=
True
;
_
=
False
newS
::
(
LogMessage
(
Maybe
Command
)
Response
)
IPAddress
->
IPAddress
newS
m
s
=
case
m
of
(
Connected
ip
)
=
ip
;
_
=
s
...
...
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