Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tools for technical analysts
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Digital Preservation
tools for technical analysts
Commits
f9828c38
Commit
f9828c38
authored
2 years ago
by
Andreas Romeyke
Browse files
Options
Downloads
Patches
Plain Diff
- added option "--trace-sip"
parent
5e15a5ed
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/SLUB/LZA/Rosetta/TA/Command/log.pm
+11
-1
11 additions, 1 deletion
lib/SLUB/LZA/Rosetta/TA/Command/log.pm
with
11 additions
and
1 deletion
lib/SLUB/LZA/Rosetta/TA/Command/log.pm
+
11
−
1
View file @
f9828c38
...
@@ -22,6 +22,8 @@ Examples:
...
@@ -22,6 +22,8 @@ Examples:
$0 log --level error --level warning --fromdate 2022-01-01 --todate 2021-02-01
$0 log --level error --level warning --fromdate 2022-01-01 --todate 2021-02-01
* Are there lines with regex "ma[tc]?h"?
* Are there lines with regex "ma[tc]?h"?
$0 log --match "ma[tc]?h"
$0 log --match "ma[tc]?h"
* Give me a trace of specific sip
$0 log --trace-sip sip293144
DESCR
DESCR
sub
description
{
sub
description
{
...
@@ -40,6 +42,7 @@ sub opt_spec {
...
@@ -40,6 +42,7 @@ sub opt_spec {
["
todate=s
"
=>
"
search ending with date
"],
["
todate=s
"
=>
"
search ending with date
"],
["
level=s@
"
=>
"
levels to search for. Levels could be: 'error', 'warn', 'info', 'debug'. You could use multiple levels by repeating
"],
["
level=s@
"
=>
"
levels to search for. Levels could be: 'error', 'warn', 'info', 'debug'. You could use multiple levels by repeating
"],
["
match=s
"
=>
"
perl regex to search for
"
=>
{
default
=>
"
.*
"}],
["
match=s
"
=>
"
perl regex to search for
"
=>
{
default
=>
"
.*
"}],
["
trace-sip=s
"
=>
"
trace a sip with given ID (SIP-ID or Deposit-ID)
"],
);
);
}
}
...
@@ -179,7 +182,14 @@ sub execute {
...
@@ -179,7 +182,14 @@ sub execute {
}
elsif
(
defined
$opt
->
csv
)
{
}
elsif
(
defined
$opt
->
csv
)
{
$output_filter
=
sub
{
csv
(
$_
[
0
],
$opt
,
$match_rx
);
};
$output_filter
=
sub
{
csv
(
$_
[
0
],
$opt
,
$match_rx
);
};
}
}
SLUB::LZA::Rosetta::TA::
scan_log
(
$date_rx
,
$level_rx
,
$match_rx
,
$output_filter
);
# prepare trace
my
$with_trace
;
if
(
defined
$opt
->
trace_sip
)
{
$with_trace
=
$opt
->
trace_sip
;
SLUB::LZA::Rosetta::TA::
trace_log
(
$with_trace
);
}
else
{
SLUB::LZA::Rosetta::TA::
scan_log
(
$date_rx
,
$level_rx
,
$match_rx
,
$output_filter
,
$with_trace
);
}
}
}
1
;
1
;
\ No newline at end of file
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