stdout

How can I configure logtash to use “stdout” as input?

帅比萌擦擦* 提交于 2019-12-12 21:46:24
问题 I have following setup: 4 Docker containers which are configured to send logs to "stdout". 1 Docker container running logstash. Now I want to configure logstash to use the "stdout" from the 4 docker containers as input. I am not planning to use logstash-forwarder now since I am just trying to setup a very basic configuration. I might switch to forwarder at a later stage. Any suggestions would be greatly appreciated. Thanks! 回答1: I found this article. This guy use logspout lib for listen

Enable buffered I/O to stdout with Intel ifort compiler

一世执手 提交于 2019-12-12 20:23:51
问题 I've read the Intel docs about enabling buffered I/O with ifort (using -assume buffered_io or FORT_BUFFERED=true ), and this works for output directly to files. However, we have large applications that are writing to stdout (e.g. write(*,*) or write(stdout,*) ), which is redirected to a file. Neither of the buffering techniques work in this case. Other than refactoring the code to write directly to files, is there a method to enable buffered I/O on stdout with ifort? This is enabled by

Line-buffering of stdout fails on MINGW/MSYS Python 2.7.3

元气小坏坏 提交于 2019-12-12 18:19:39
问题 The problem is illustrated by this simple script: import time, os, sys sys.stdout = os.fdopen( sys.stdout.fileno(), 'w', 1 ) # line-buffer stdout print 'before sleep' time.sleep( 10 ) print 'after sleep' If line-buffering is successful, then there will be a 10-sec gap between the printing of the two lines. If not, both lines will appear virtually at the same time after a 10-sec pause (once Python starts up); that is, the lines are printed when the program exits. On Linux, I see line-buffered

How can I get unicode characters from robocopy process standard ouput in c#

夙愿已清 提交于 2019-12-12 17:19:35
问题 Our application runs various actions and displays the output in a log window. One action uses robocopy to copy files between folders. This works ok until the robocopy output contains unicode characters. I understand that I need to use the /unicode option but all I seem to get back is gibberish. Here's my simplified code sample: class Program { static void Main(string[] args) { StreamReader outputReader = null; StreamReader errorReader = null; using (Process process = new Process()) { Encoding

Where is System.err on Windows?

笑着哭i 提交于 2019-12-12 13:28:29
问题 I have a Java GUI-based application that writes some diagnostic messages to System.out and System.err. Where are these messages output when running on Windows? (For example, on Mac OS X, they're printed to the system console log.) Edit I should add that the Java application is packaged as a .exe, so (right now) I can't launch it using java . (I can copy the individual .JAR files to the Windows test machine, I suppose.) Also, it's an app I inherited that didn't use a logging framework before;

How to capture standard out and print to both the console and a file during process runtime (C++/Boost.Process)

我只是一个虾纸丫 提交于 2019-12-12 12:22:48
问题 I am working on an application that starts child processes using Boost's C++ Process library (http://www.highscore.de/boost/process0.5) and redirects the standard out of that process to a file using the below code: boost::process::initializers::bind_stdout(boost::iostreams::file_descriptor_sink goes here ) The above solution and code worked well. However, now, I need to be able to print the child process's standard out to both a file and the console. I have found the code below which seems

How to keep the unit test output in Jenkins

我的梦境 提交于 2019-12-12 08:41:11
问题 We have managed to have Jenkins correctly parse our XML output from our tests and also included the error information, when there is one. So that it is possible to see, directly in the TestCase in Jenkins the error that occurred. What we would like to do is to have Jenkins keep a log output, which is basically the console output, associated with each case. This would enable anyone to see the actual console output of each test case, failed or not. I haven't seen a way to do this. * EDIT *

Sharing stdout among multiple threads/processes

橙三吉。 提交于 2019-12-12 08:11:12
问题 I have a linux program(the language doesn't matter) which prints it's log onto stdout. The log IS needed for monitoring of the process. Now I'm going to parallelize it by fork'ing or using threads. The problem: resulting stdout will contain unreadable mix of unrelated lines... And finally The question: How would you re-construct the output logic for parallel processes ? 回答1: Sorry for answering myself... The definite solution was to use the GNU parallel utility. It came to replace the well

Redirect standard output to a file?

北城以北 提交于 2019-12-12 06:46:09
问题 I want to write a function which would redirect the standard output to a file where the name of the file is "name".log where "name" is the argument to the function void redirect(char *name) { I don't know where to begin. 回答1: You can use freopen() // code copied from the link #include <stdio.h> ... FILE *fp; ... fp = freopen ("/tmp/logfile", "a+", stdout); ... 来源: https://stackoverflow.com/questions/23135577/redirect-standard-output-to-a-file

How to handle different stdout behaviour in external program?

若如初见. 提交于 2019-12-12 04:45:40
问题 Hi I am trying to execute external program from Java program and read the stdout message in real time , without waiting for the program to exit. However, i found that there are different stdout behaviour in different .exe program, and I don't know how to handle it. Example 1: server1.exe is a console program. When i run it, it will continuously listening on a port. When a client is connected to it, it will generate 1 line of stdout output every 1 second. It will not exit unless i press "ctrl