Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
zah committed Jun 16, 2020
1 parent 7064429 commit 858e4ea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 19 deletions.
21 changes: 3 additions & 18 deletions ctail.nim
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
import
tables, macros, parseopt, strutils, sequtils, unicode, algorithm, json,
re, terminal, os, streams, threadpool, parsesql, asyncdispatch, browsers,
re, terminal, os, threadpool, parsesql, asyncdispatch,
asynctools/asyncproc, faststreams/asynctools_adapters, faststreams/textio,
prompt, chronicles, chronicles/topics_registry,
pipes, webui/server

type
SyntaxError = object of Exception

Messagekind = enum
Cmd,
Log

Message = object
content: string
kind: Messagekind
SyntaxError = object of CatchableError

Command = enum
cmdClearFilter,
Expand Down Expand Up @@ -43,19 +35,13 @@ var
mainLoopPipe = createPipe(register = true)
filter: SqlNode
regex = re("")
recordFormat = ""
jTest = %*{"msg": "foo", "level": "dbg", "ts": 3.14, "topics": "bar", "thread": 0}
activeRecordPrinter: RecordPrinter = printTextLine
activeFilter = ""
activeGrep = ""
activeTopics = ""
webuiPort = -1

template jsKind(value): JsonNodeKind =
when value is string: JString
elif value is int: JInt
else: {.error: "Add another type here".}

proc createTopicState(name: string): ptr TopicSettings =
result = getTopicState(name)
if result == nil:
Expand Down Expand Up @@ -474,8 +460,7 @@ proc inputThread =
mainLoopPipe.writePipeFrame(line)
except:
let ex = getCurrentException()
# print ex.getStackTrace
# print ex.msg
print ex.msg
quit 1

spawn inputThread()
Expand Down
2 changes: 1 addition & 1 deletion webui/server.nim
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import
macros, json, random, times, strutils, os,
macros, random, strutils, os,
asynchttpserver, asyncnet, asyncdispatch, websocket,
../chronicles_tail/configuration

Expand Down

0 comments on commit 858e4ea

Please sign in to comment.