DCMTK change logger filename - dcmtk

I am very confused about the DCMTK > 3.6.0 logging mechanism oflog/log4cplus
I simply need my code to specify the logname for dcmtk to log into. How is that done ?
Thanks!

The answer can be found in DCMTK's "logger howto": https://support.dcmtk.org/redmine/projects/dcmtk/wiki/Howto_LogProgram#Redirecting-log-output-to-a-file

Related

Read Python Logging Log File in Ubuntu

Environment
I am running code I found online and it uses the logging library to create logs. I am using python3.6.9 on Ubuntu 18.04. The code is a neural network Tensorflow code, in case that is somehow relevant.
The Problem + More Info
When I use vim to open the log files produced it looks like they are in binary.
Using the file command in Ubuntu I see that the type of the file is "data".
In the code the logger is initiated using logging.basicConfig(stream=sys.stdout, level=logging.DEBUG)
the file is being saved as a .0 and .1 files, i.e events.out.tfevents.1600700600.mycomputername.21941.1.
Please let me know any other information you need me to provide.
Thank you in advance for any help available.
Most probably the file you open is not one generated by the python logging module because the configuration shown: logging.basicConfig(stream=sys.stdout, level=logging.DEBUG) is just logging stuff to stdout not to a file

Mujoco_py missing path to LD_LIBRARY_PATH, Ubuntu 16.04

I am trying to get mujoco_py running. When I do
import mujoco_py
I get this error:
Exception:
Missing path to your environment variable.
Current values LD_LIBRARY_PATH=
Please add following line to .bashrc:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/jonah/.mujoco/mjpro150/bin
I have added the above line to both /etc/skel/.bashrc and ~/.bashrc. If I run
echo $LD_LIBRARY_PATH
I get
/home/jonah/.mujoco/mjpro150/bin/
My .mujoco folder includes mjkey.txt and the mjpro150 folder. I can run ./simulate successfully, so I have a feeling that this is some kind of mujoco_py specific bug.
Which program do you use to import mujoco?
I had a similar issue using mujoco_py with PyCharm Community 2018.1. A workaround was to launch PyCharm from the terminal instead of using the launcher icon. Maybe it could help with your issue too.
Otherwise you could try adding the LD_LIBRARY_PATH to ~/.profile instead of ~/.bashrc, as proposed in this answer here: https://askubuntu.com/questions/1022836/python-not-recognizing-ld-library-path/1022913#1022913
You can try to reinstall Pycharm for the newest version.
After you save the .bashrc file your want execute this code.
source ~/.bashrc
Now link is updated.
Please check the user which you run the code with. The mismatch user will cause this problem. There is the checklist may help you:
Don’t use ‘sudo’ to run the code;
Don’t use ‘sudo’ or virtual environment (e.g., anaconda) to run Pycharm (If you run the code in Pycharm).

Determination and CLASSPATH installation in LINUX

Determination and CLASSPATH installation in LINUX
Excuse for a silly question (I ask to treat with understanding, I in linux the beginner and replenish knowledge as required) but how to define CLASSPATH in LINUX and where it is set. I tried to execute a command
root#one: echo $CLASSPATH
but in reply gave out only blank line.
okay so in order to set the classpath
//to temporarly set the classpath use export CLASSPATH=someclass path
open your bashrc file in nano editor(default provided editor)
type nano ./.bashrc
and type the class as mentioned below
export PATH=${PATH}:/usr/java/jdk1.5.0_07/bin
version may differ of your java
heres a link that may help you
TRY THIS LINK

module: command not found

I'm attempting to load several modules for building a library on Linux but am told that the command 'module' doesn't exist. I've Googled around and discovered that the solution was to source a directory called "module" which I am unable to locate despite extensive searching.
I'm not quite sure what I should and any help would be appreciated (it might help to know that the makefile I'm working with uses csh while my default shell is bash). Thanks!
I tried to reproduce it and it turns out that for me sourcing
source /etc/profile.d/modules.sh
in th .sh script helps for bash and similar. For csh and tcsh, you have to add
source /etc/profile.d/modules.csh
to the script. Note, that this line must come first and then the
module load foo
line.
I got here as I was searching for ways to install multiple php versions in CentOS7 and https://blog.remirepo.net/post/2019/05/22/PHP-7.4-as-Software-Collection was one of the articles I tried to follow and encountered the same "module: command not found" issue.
Sourcing /etc/profile via command:
. /etc/profile
seems to make the "module load" work.
Credits to fadishei in https://forums.fedoraforum.org/showthread.php?262708-module-command-not-found
To make the version of php (e.g. php7.4) persist, append the following to file /etc/profile.d/custom.sh
source /etc/profile.d/modules.sh
module load php74
Reboot and run the php --version to cross-check that php 7.4 is the current version installed.
I think that you have to put this in your script to define the module command:
module () {
eval `/usr/bin/modulecmd bash $*`
}
This was working for me
#!/bin/bash -i // it will make this interactive

Cygwin and PHPUnit: Could not open input file: /cygdrive/c/xampp/php/phpunit

Is there a way to run PHPUnit from Cygwin? Everytime I run PHPUnit I get this error:
Could not open input file: /cygdrive/c/xampp/php/phpunit
I am trying to run my unit tests in my Zend Framework App. I am trying to use Cygwin because I am more familiar with *Nix commands (I'm no expert though) rather than Windows.
Thanks,
Wenbert
same problem here, solved it by an alias added to ~/.bash_profile
alias phpunit="/cygdrive/c/xampp/php/php C:/xampp/php/phpunit"
I am having the same problem, I can't get "phpunit" to work by itself, I am using Wamp.
However, I was able to run "phpunit.bat" and it worked for me.
Still can't get the ANSI colors to show up though :(
Does /cygdrive/c/xampp/php/phpunit exist? If so what are the permissions on the file?
Try
ls -l /cygdrive/c/xampp/php/phpunit
Let's use phpunit as dependency and in folder above vendor try:
ln -s vendor/phpunit/phpunit/composer/bin/phpunit phpunit
It will create for you a symbolic link to real path of phpunit
You could just directly call it by using Windows path in Cygwin:
C:/xampp/php/phpunit --version
So you could set an alias for ~/.bash_profile:
alias phpunit="C:/xampp/php/phpunit"

Resources