<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: How to log by command System.out.println() in ivy?</title><link>https://answers.axonivy.com/questions/2635/how-to-log-by-command-system-out-println-in-ivy</link><description>&lt;p&gt;Hi all&lt;/p&gt;
&lt;p&gt;I tried to use that command in ivy but nothing happen in console view. So does anyone know reason why it does not work and can we make it work?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/2635/how-to-log-by-command-system-out-println-in-ivy" rel="self"></atom:link><language>en</language><lastBuildDate>Thu, 29 Mar 2018 02:49:42 -0400</lastBuildDate><item><title>Answer by Reguel Wermelinger</title><link>https://answers.axonivy.com/questions/2635/how-to-log-by-command-system-out-println-in-ivy/3160</link><description>&lt;p&gt;The ivy way is to use &lt;code&gt;ivy.log&lt;/code&gt; API in scriptlets or &lt;code&gt;Ivy.log().info("hey there")&lt;/code&gt; in java code. Logs written over this API will are prominently listed in the Runtime Log View and trough filtering the exlporation of them is much more convenient than parsing trough a raw console log...&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reguel Wermelinger</dc:creator><pubDate>Thu, 29 Mar 2018 02:49:42 -0400</pubDate><guid>https://answers.axonivy.com/questions/2635/how-to-log-by-command-system-out-println-in-ivy/3160</guid></item><item><title>Comment by trungdv on khanh11166's answer</title><link>https://answers.axonivy.com/questions/2635/how-to-log-by-command-system-out-println-in-ivy#3145</link><description>&lt;p&gt;Thanks &lt;a href="https://answers.axonivy.com/users/172/khanh11166"&gt;&lt;a href="https://answers.axonivy.com/users/172/khanh11166"&gt;@khanh11166&lt;/a&gt;&lt;/a&gt;
It's a alternative solution, but i will be more happy if i can log directly in console like normal java project. It's more convenient&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">trungdv</dc:creator><pubDate>Fri, 23 Mar 2018 00:50:15 -0400</pubDate><guid>https://answers.axonivy.com/questions/2635/how-to-log-by-command-system-out-println-in-ivy#3145</guid></item><item><title>Answer by khanh11166</title><link>https://answers.axonivy.com/questions/2635/how-to-log-by-command-system-out-println-in-ivy/3135</link><description>&lt;p&gt;you can use this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;FileOutputStream fos = null;
    try {
        fos = new FileOutputStream("D:/logCloner.txt");
    } catch(FileNotFoundException e) {
        // TODO Auto-generated catch block
        ivy.log.error(e);
    }

     // Create new print stream for file.
     PrintStream ps = new PrintStream(fos);

     // Set file print stream.
     System.setOut(ps);
     System.out.println("Print in the file !!");
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I tested in my Ivy desinger - worked
&lt;img alt="alt text" src="https://answers.axonivy.com/upfiles/Screenshot_2.png"&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">khanh11166</dc:creator><pubDate>Tue, 20 Mar 2018 09:04:02 -0400</pubDate><guid>https://answers.axonivy.com/questions/2635/how-to-log-by-command-system-out-println-in-ivy/3135</guid></item></channel></rss>