[Glass] RPS gems and logging

Dale Henrichs via Glass glass at lists.gemtalksystems.com
Tue Nov 7 08:26:38 PST 2017


Iwan,

I guess you have two questions and I can answer the first one and take a 
stab at the second...

First question, RPC gems inherit the environment variable from the 
netldi, so any env vars you want the RPC gem to see need to be set 
before starting the netldi. If you are running a linked gem (i.e., 
topaz) the environment variables are inherited from the process starting 
topaz.

The second question (log everything in one spot) is why I asked the 
version question, because I seem to recall that there are cases where 
not all logs got handled correctly, but as I think about it the problem 
areas may have been relatively special cases and/or version specific 
bugs. I'll wait until you get the basic logging working with 
GEMSTONE_NRS_ALL before digging deeper.

As shameless a plug for using GsDevKit_home, you can set custom env vars 
in a per stone custom_stone.env. As Mariano mentions GEMSTONE_LOGDIR 
defines the log location and here is the NRS expression used:

   GEMSTONE_NRS_ALL='#dir:$GEMSTONE_LOGDIR#log:%N%P.log'

The custom_stone.env script is executed before starting your netldi, 
when using startNetldi and before starting a topaz session when using 
startTopaz. You can use GsDevKit_home without having to use tODE or 
extent0.seaside.dbf. Currently to create a stone that uses extent0.dbf 
you would do the following:

   createStone -g -s 
$GS_HOME/shared/downloads/product/GemStone64Bit3.3.3-i386.Linux/product/bin/extent0.dbf 
gs_333 3.3.3

I've got a release in the "oven" that simplifies the creation process:

   createStone -G gs_329 3.2.9

Dale

On 11/4/17 11:50 PM, Iwan Vosloo via Glass wrote:
> Hi there,
>
> I have a question regarding logging in the scenario where you have an 
> RPC gem which is started by netldi on a node where the target stone 
> resides. Assume also possibly more than one different stone running here.
>
> I'd like to control where the RPC gem would log. Now, AFAIK, you can 
> do this from the connecting client's side by changing the NRS, but I 
> don't want clients to have to know this. So the other way to do this 
> is by setting GEMSTONE_NRS_ALL=#dir:/some/where but the problem with 
> this is that GEMSTONE_NRS_ALL applies to all stones started by the 
> single netldi in whose environment you set the variable.
>
> I want to log everything to do with a specific stone (including the 
> gems started for it) in one place.
>
> The docs say: "If you set GEMSTONE_NRS_ALL before starting a Stone, an 
> application, or a utility (such as copydbf), that setting applies only 
> to your own processes and does not affect other users.
> "
>
> ...so I have tried setting it when running startstone for that 
> particular stone only (NOT for startnetldi) - yet it seems to be 
> ignored (which makes sense since the stone is not the thing starting 
> up the gem).
>
> The other way I can think of doing this is to have my own modified 
> scripts in $GEMSTONE/sys that set GEMSTONE_NRS_ALL based on the stone 
> you want to connect to, but that feels like reinventing the wheel.
>
> Is there any way to achieve what I want to do without involving the 
> connecting client's NRS or starting differently named netldi's or 
> changing the standard sys/ scripts?
>
>
> Reards
> Iwan
> _______________________________________________
> Glass mailing list
> Glass at lists.gemtalksystems.com
> http://lists.gemtalksystems.com/mailman/listinfo/glass



More information about the Glass mailing list