Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. Jboy123

    log4perl

    Steve I'm an idiot - your suggestion above does of course work.....my testing was flawed.... :) I stupidly put the following when testing. Doh! qx{cp $fileA $fileA.bak > 2>&1}; and not of course: qx{cp $fileA $fileA.bak 2>&1}; Thanks! Works perfectly well now!
  2. Jboy123

    log4perl

    Many thanks for the response, Steve. I had actually already tried that one and sadly it doesn't work either. The error message still gets displayed and worse the error code returned is 0. So - many thanks anyway but still stumped so far :)
  3. Jboy123

    log4perl

    Hi All The issue above is actually causing me more hassle than I first thought. It looks like when I do the following: $logger->info("calling sub extCmd"); my @return = extCmd(some args here); my $rc = pop(@return); if ($rc != 0){ $logger->error("script called in sub extCmd...
  4. Jboy123

    log4perl

    Hi all I managed to get the return code back to the call script and can now verify the return code and then set logging accordingly. See below: sub extCmd { # some code here # some more here my @output = qx{some command here}; my $exval = $?; push (@output, $exval); return...
  5. Jboy123

    log4perl

    Hi Kevin Many thanks for the response. I have read the links you posted (in fact, the second was my intro to log4perl :). I think I'm fairly comfortable with what log4perl can do in terms of log levels, appenders, logger initialisation, re-reading etc. Perhaps I misunderstood something or...
  6. Jboy123

    log4perl

    Hi Steve! Many thanks for the tip. It's not 100% what I was looking for for but definitely a step in the right direction and will certainly work for me - so thanks! I was hoping to find a realtime solution, I guess with this one you have to wait until the external call completes before logging...
  7. Jboy123

    log4perl

    Hi All I recently started investigating using log4perl - which is great! I, rather disappointingly, also discovered that the majority of output that I generate from my scripts comes from either system calls or running of external code (e.g. java). Is there any way I can get the output from...
  8. Jboy123

    Split question

    Many thanks! That's a big help! Jules
  9. Jboy123

    Split question

    Hi All Aplogies in advance for a dumb question. I'm trying to read in a file format as follows: myVariableName=myValue I then do a split against this: set props [ split $arg = ] Then I assign assign values to my variables: set [lindex $props 0] [lindex $props 1] That's all fine until my...
  10. Jboy123

    Dynamic Perl Variable name

    Thanks for the info - I'll try with a hash!
  11. Jboy123

    Dynamic Perl Variable name

    Hi All I'd like to be be able to read in some data from a file, create some variable names based on the data, assign values to these variables and then access the values assigned via the newly created variable name....sorry this is confusing. Something like this:- File contains abc 123 If I...
  12. Jboy123

    Wsadmin - JVM custom properties

    Thanks on both counts!!
  13. Jboy123

    Wsadmin - JVM custom properties

    Hi Does anyone know how to set a JVM custom property in wsadmin? I know how to do it through Web Console (Application Servers > myServer > Process Definition > Java Virtual Machine > Custom Properties) but would much prefer to script this. Any ideas? Many Thanks. J
  14. Jboy123

    StaleConnection Exception on WAS 4.x

    Yeah We get this often . No big deal - just means DB connectivity disappers during backup and then you connection pool has some connection that are no longer valid. As you app gets connection from the pool these will be replaced with valid connections. If it bothers you - worth doing online...
  15. Jboy123

    Get variable value

    Okay Got it to work by using eval $installdir = eval "$myhostnameHash{$hostname}"; Thanks for your help.
  16. Jboy123

    Get variable value

    Hi I'm still getting the same issue: I think the problem is with : # Then set a variable that is equal to a variable defined earlier in script $installdir = "$myhostnameHash{$hostname}"; print "Value of installdir is $installdir\n"; What I want to achieve is: $installdir = $wcnode; # Where...
  17. Jboy123

    Get variable value

    Thanks Teriviret Both seem to work. $myhostnameHash{$key} = $value; %myhostnameHash->{$key} = $value; This is the first time I've been playing around with hashes so I'm not really sure what the difference in the two lines is. When I retrieve the key from the has the correct value is...
  18. Jboy123

    Get variable value

    Hi Tried use strict but just got back a page full of messages along lines of: Global symbol "$variable" requires explicit package name at ./myscript.pl line 46. Is ther something I should be looking for? $hostname = "myhost"; myhost is just a value. Thanks
  19. Jboy123

    Get variable value

    Hi I'm having a problem where a variable is not being interpreted instead the name of the variable is being displayed. sub one { # Some code here that sets following variable $wcnode="avalue" } sub two { $hostname=myhost; #Read in a config file with key/value pairs separated by '='...
  20. Jboy123

    Problem with variables

    Bob Thanks for everything. All working just fine now! Thanks again Jules

Part and Inventory Search

Back
Top