Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Informatica Secure Agent
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
interop
iics
Informatica Secure Agent
Commits
8a85c36b
Commit
8a85c36b
authored
5 years ago
by
Eric Schoville
Browse files
Options
Downloads
Patches
Plain Diff
Add JSON_LOG parameter, tail agentcore.log
parent
f9d7bb44
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
run_agent.sh
+13
-2
13 additions, 2 deletions
run_agent.sh
with
13 additions
and
2 deletions
run_agent.sh
+
13
−
2
View file @
8a85c36b
...
@@ -153,7 +153,7 @@ prep_term
...
@@ -153,7 +153,7 @@ prep_term
./infaagent startup
./infaagent startup
# sleep to allow startup (probably should refactor to use inotify tools or somesuch)
# sleep to allow startup (probably should refactor to use inotify tools or somesuch)
sleep
5
sleep
10
if
[
"
$register
"
=
true
]
;
then
if
[
"
$register
"
=
true
]
;
then
...
@@ -190,8 +190,19 @@ curl -sS -H "Content-Type: application/json" \
...
@@ -190,8 +190,19 @@ curl -sS -H "Content-Type: application/json" \
term_child_pid
=
$(
cat
$PID_FILE
)
term_child_pid
=
$(
cat
$PID_FILE
)
echoGreen
"Secure Agent Starting pid:
$term_child_pid
"
echoGreen
"Secure Agent Starting pid:
$term_child_pid
"
if
[[
-n
${
JSON_LOG
+x
}
&&
"
$JSON_LOG
"
=
true
]]
;
then
# https://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/PatternLayout.html
# Replace the text line with a json formatted line. This is ugly.
find
.
-type
f
-name
log4j.properties
\
-exec
sed
-i
'/^log4j.appender.stdout.layout.ConversionPattern/c\log4j.appender.stdout.layout.ConversionPattern={"dateIso8601":"%d","timeZone":"%d{z}","priority":"%p","category":"%c","message":"%m"}%n'
\
{}
\;
fi
# wait until terminated
# wait until terminated
while
true
while
true
do
do
tail
-f
/dev/null
&
wait
${
!
}
tail
-f
agentcore.log
&
wait
${
!
}
done
done
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