Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
X
xlte
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
xlte
Commits
271fad82
Commit
271fad82
authored
Mar 17, 2023
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
amari.xlog: Add LogSpec constructor
We will soon need to construct logspecs not only by way of parsing.
parent
393b5270
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
amari/xlog.py
amari/xlog.py
+6
-5
No files found.
amari/xlog.py
View file @
271fad82
...
...
@@ -79,6 +79,11 @@ class LogSpec:
DEFAULT_PERIOD
=
60
def
__init__
(
spec
,
query
,
optv
,
period
):
spec
.
query
=
query
spec
.
optv
=
optv
spec
.
period
=
period
def
__str__
(
spec
):
return
"%s[%s]/%ss"
%
(
spec
.
query
,
','
.
join
(
spec
.
optv
),
spec
.
period
)
...
...
@@ -116,11 +121,7 @@ class LogSpec:
if
c
in
query
:
bad
(
"invalid query"
)
spec
=
LogSpec
()
spec
.
query
=
query
spec
.
optv
=
optv
spec
.
period
=
period
return
spec
return
LogSpec
(
query
,
optv
,
period
)
# xlog queries service @wsuri periodically according to queries specified by
...
...
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