Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Cecil Westerhof Newsgroups: comp.lang.java.programmer Subject: Re: What happens when format gets a wrong argument Date: Fri, 19 Aug 2016 07:23:48 +0200 Organization: Decebal Computing Lines: 24 Message-ID: <871t1ljpqz.fsf@Equus.decebal.nl> References: <87eg5lkd05.fsf@Equus.decebal.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: mx02.eternal-september.org; posting-host="12baf5125b19322b899c79c2e3878015"; logging-data="9589"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/IXm8WwhOKFjTX8ArFH75u/D+ACLxwYSY=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:V0J29DRhb0s4lHCA7Otd1TdJbX4= sha1:0keJGUoIKTymlgza03iq8074meY= X-Homepage: http://www.decebal.nl/ Xref: csiph.com comp.lang.java.programmer:35406 On Friday 19 Aug 2016 01:35 CEST, Arne Vajhøj wrote: > On 8/18/2016 5:01 PM, Cecil Westerhof wrote: >> Is there a way to get things automatically logged? > > You can always catch and log explicit in the executing > code. That is what I now do: ses.scheduleAtFixedRate(new Runnable() { @Override public void run() { try { saveMemoryLine(); } catch (Exception e) { logMessage(e.getMessage()); } } }, 1, 1, TimeUnit.MINUTES); -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof