Re: [xwiki-users] Write to logger using Velocity

2014-08-27 Thread Thomas Mortagne
http://extensions.xwiki.org/xwiki/bin/view/Extension/Logging+Module#HGetaLoggerfromscript allows logging without programming right but if you don't care about required right and are admin you can use Groovy to "inject" that logger for you (there is no pure Velocity solution here since Velocity API

Re: [xwiki-users] Write to logger using Velocity

2014-08-26 Thread Jeremie BOUSQUET
Yes, quoting Vincent Massol above : "Since XWiki 6.1" ;-) See also here: http://extensions.xwiki.org/xwiki/bin/view/Extension/Logging+Module#HGetaLoggerfromscript So for < 6.1, I think there must be a solution but right now I don't know ... 2014-08-26 17:25 GMT+02:00 Jason Clemons : > This is s

Re: [xwiki-users] Write to logger using Velocity

2014-08-26 Thread Jason Clemons
This is something new to 6.1? I'm not on 6.1 yet, maybe that's why? > On Aug 26, 2014, at 8:21 AM, "Jeremie BOUSQUET" > wrote: > > 2014-08-26 17:08 GMT+02:00 Jason Clemons : > >> So sorry, but one more question..since I'm new to Xwiki, and all of it's >> underlying architecture (I'm a .net gu

Re: [xwiki-users] Write to logger using Velocity

2014-08-26 Thread Jeremie BOUSQUET
2014-08-26 17:08 GMT+02:00 Jason Clemons : > So sorry, but one more question..since I'm new to Xwiki, and all of it's > underlying architecture (I'm a .net guy) I'm sure this is something that > I'm doing wrong, but I figured I'd ask. > > When I copy and paste the code you provided below into a pa

Re: [xwiki-users] Write to logger using Velocity

2014-08-26 Thread Jason Clemons
I have exactly that in my page, that's why I was confused :) > On Aug 26, 2014, at 8:17 AM, "Valdis Vītoliņš" wrote: > > You need to say that following will be velocity script with > opening/closing tags like this: > > {{velocity}} > #set($logger = $services.logging.getLogger("My script")) > $l

Re: [xwiki-users] Write to logger using Velocity

2014-08-26 Thread Valdis Vītoliņš
You need to say that following will be velocity script with opening/closing tags like this: {{velocity}} #set($logger = $services.logging.getLogger("My script")) $logger.info("foobar") {{/velocity}} Valdis ___ users mailing list users@xwiki.org http:/

Re: [xwiki-users] Write to logger using Velocity

2014-08-26 Thread Jeremie BOUSQUET
2014-08-26 16:39 GMT+02:00 Jason Clemons : > That's why I said "forgive my ignorance" in my previous email :) > > I was thrown off by defining the "informative name". Is that a persistent > value once defined? Or is just something that gets added to the log entry? > That's something that may get

Re: [xwiki-users] Write to logger using Velocity

2014-08-26 Thread Jason Clemons
So sorry, but one more question..since I'm new to Xwiki, and all of it's underlying architecture (I'm a .net guy) I'm sure this is something that I'm doing wrong, but I figured I'd ask. When I copy and paste the code you provided below into a page (in the "source" section) the page and the scr

Re: [xwiki-users] Write to logger using Velocity

2014-08-26 Thread Jason Clemons
That's why I said "forgive my ignorance" in my previous email :) I was thrown off by defining the "informative name". Is that a persistent value once defined? Or is just something that gets added to the log entry? > On Aug 25, 2014, at 11:28 PM, "Jeremie BOUSQUET" > wrote: > > Hello, > > {{

Re: [xwiki-users] Write to logger using Velocity

2014-08-25 Thread Jeremie BOUSQUET
Hello, {{velocity}} #set($logger = $services.logging.getLogger("My script")) $logger.info("foobar") {{/velocity}} This is exactly what is on the page linked by Vincent, just with a more similar "look" to your own sample. "My script" is just an informative name of the logger you create. You cou

Re: [xwiki-users] Write to logger using Velocity

2014-08-25 Thread Jason Clemons
Thanks again for taking time to respond, forgive my ignorance..I still don't really "get it" could you possibly show me an example of the syntax for writing to the logs from within my Velocity code? In groovy I can simply write: {{groovy}} System.out.println("foobar") {{/groovy}} I'm just havi

Re: [xwiki-users] Write to logger using Velocity

2014-08-25 Thread vinc...@massol.net
  On 25 Aug 2014 at 18:26:28, Jason Clemons (jason.clem...@live.com(mailto:jason.clem...@live.com)) wrote: > Thanks for the response Vincent, I did see this article, but I'm having > trouble figuring out how to implement it. Ultimately, I just want the > equivalent of "Console.Log('foobar');

Re: [xwiki-users] Write to logger using Velocity

2014-08-25 Thread Jason Clemons
Thanks for the response Vincent, I did see this article, but I'm having trouble figuring out how to implement it. Ultimately, I just want the equivalent of "Console.Log('foobar');" for some debugging code. I don't want to setup a full blown logging architecture or anything heavy for my wiki.

Re: [xwiki-users] Write to logger using Velocity

2014-08-25 Thread vinc...@massol.net
On 25 Aug 2014 at 18:02:12, Jason Clemons (jason.clem...@live.com(mailto:jason.clem...@live.com)) wrote: > Hello, can someone please give me an example of how to write to a log using > Velocity code? > > I'd really like to write a text file, but at this point any logging would be > tremendous

[xwiki-users] Write to logger using Velocity

2014-08-25 Thread Jason Clemons
Hello, can someone please give me an example of how to write to a log using Velocity code? I'd really like to write a text file, but at this point any logging would be tremendously helpful, thanks ___ users mailing list users@xwiki.org http://lists.xwi