Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
So i'm loading my context variables via a db and contextload and determining which environment this should be run under in the SQL table. (with a simple active flag),
is there a way i can populate the context environment name from this load, so that my logs and stats don't say "default" in them but reflect the value in the sql table?
Thanks 🙂
Steve
there is a String variable named contextStr wich is public , it contain the context type (for my job dev, preprod or prod).
you can play with it in a tJava : contextStr = "the value from the db";
and in all the log the field context will have the value you set.
Hi do you use tlogcatcher to catch all log ?
In tlogCatcher you have a field context : it's the context state use by the job, you can esaily manipulate this variable with custom value for your log.
that sounds right. I'm using the inbuilt db function (in job properties) to capture the stats/logs/meter, but still using a tlogcatcher to send some emails.
it's the db part i'd like to add this field to. do i need to populate a variable for it?
there is a String variable named contextStr wich is public , it contain the context type (for my job dev, preprod or prod).
you can play with it in a tJava : contextStr = "the value from the db";
and in all the log the field context will have the value you set.
That's fantastic Thankyou! just couldn't find where that variable was!
it all works!! 🙂
is there a reference guide with them in somewhere?
nope I just find it in the code .
select one of my answer as the best please