Hello X-Wikians,
I am currently browsing the Xwiki Code and thus found the current
handling of the logging to catch my eye.
I filed a jira idea (XWIKI-2437) to use slf4j as logging abstraction. it
wasn't until this mornig though that I found the new logging
Architecture in the component sub part, and also Vincent pointed me 20
minutes later to it.
Still even with the logging pushed through the
org.xwiki.component.logging.Logger interface I have a suggestion.
A very good thing at the slf4j and particularly one of the
implementations is that building of the logging strings can be deferred
to the logger. I will explain that with an example:
Current Logger interface you will have to do this (or something similar)
LOG.debug("my debug message is " + var1 + " " + var2 + ": " + var3 );
This will force the Java VM to build the string and then call the
function to realize later that the string will not be logged. Now one
could introduce an if statement with log.isDebugEnabled() before any
such statement, but that is kind of tedious and clutters the code.
In slf4j you would write something like this:
LOG.debug("my debug message is {} {}: {}", var1, var2, var3);
Thus the function will be called but the string operation can take place
iff the string will really be logged. (see http://www.slf4j.org/manual.html)
So my proposal is to give the logging interface a little bit of slf4j
flavor and introduce log statements with varargs or Object arrays like:
public void debug(String msg, Object... args);
/* plus all the other loglevels */
If one wants to use log4j then a simple wrapper could be written to
format those args before log it depending on the loglevel.
Thinking a bit further, slf4j does already that what it is intended with
the new component logger since the implementations are deploytime
pluggable (currently logback, simple logger, log4j and jcl can be used
as backend) and slf4j is just a facade to the logging system, thus
fulfilling the component based approach. Since reuse is better than
reinvent...
cheers
Jonas
Hi (Sergiu),
I finally read your SX design doc yesterday night and I have some
questions:
* It's called Skin Extensions (SX) but it seems to be missing vm
extensions, right? AFAIU this is in IX. I would have expected Skin
extensions to include vm. Maybe just a problem of terminology.
* How do you manage CSS/JS that depend on the skin used. For ex you
took the example of usersandgroups.css in your doc but that CSS is
different for Albatross and for Toucan. How do we handle this?
* Now that it's implemented, would be nice to move the doc to the
developer's guide and add some examples. Also do you know where in the
code this is used right now?
* Has there been some measurements to see how performance is affected?
Thanks a lot, sounds very cool.
-Vincent
Hello Vincent, Pressing EDIT button on XWiki Enterprise wiki page
shows the TAG list attached to a page aloowing them to be changed.
I do not see it here in workspaces. How do I get that in XWiki
workspaces so that I may set/reset TAG values.
Best Regards,
Viv
Hi,
Just committed the new rendering mechanism in xwiki core. Please note
that this is a work in progress and it's missing a LOT of things.
However we can now all work together on finishing it.
Here's how it works:
* Each document has a syntax id, which defaults to XWiki 1.0
* In edit mode (Toucan skin), you can change the syntax for a page
using the Document Information panel on the right
What's supposedly working in the new syntax:
* basic wiki syntax, lists, paragraph. Not everything is done yet and
there are some bugs in the WikiModel XWiki parser
* velocity macro, xhtml macro and include macro
Try it out and have fun, just don't expect too much yet... ;)
-Vincent
Hi all,
Besides working on the new Administration, I also did some clean up for the
existing apps (blog, photos, calendar), making them platform applications.
The question is: should I place the pages in app. specific spaces (ex. Blog,
Calendar, Photos) and also update all the links to the new apps in all xwiki
docs (I have already a 80% finished version of this kind) or should I leave
the files in the XWiki space? (as Jv mentioned, we might need to keep the
compatibility for older clients because most of the pages which need updates
are classes, so this could break possible hand-made queries)
Thanks,
Evelina
Hi all,
I have a problem when saving a wiki in the wiki editor. When it is saved an
exception occurs (below). When i then view the page after the exception it
works fine. Does anyone have any suggestions on what i can do to fix it?
Thanks,
John Carroll
A problem occured while trying to service your request. Please contact the
support if this happens again.
Detailed information:
Error number 3201 in 3: Exception while saving document
StageGate.WebHome
Wrapped Exception: Error number 13012 in 3: Exception while saving links
Wrapped Exception: Row was updated or deleted by another transaction (or
unsaved-value mapping was incorrect):
[com.xpn.xwiki.objects.LargeStringProperty#]
--
View this message in context: http://www.nabble.com/exception-when-saving-wiki-in-editor%28wiki%29-tp1766…
Sent from the XWiki- Dev mailing list archive at Nabble.com.
Hi All,
I thought it's better to keep you all updated about what i'm doing. I've
finally managed to free myself from academics and now i'm working on WebDAV
interface.
* I have gone through Ludovic's sample XWikiWebDAV implementation and except
for few parts now i understand the code base and what i need to do. And i
should mention that this sample implementation was very useful, i would have
lost otherwise ;)
* I've put up an eclipse project with WTP (Web Tools Platform) support which
let me test the DAV implementation easily. Also, using M2Eclipse i have
created a pom as well.
* Currently, with a back-end xwiki database, i can test the DAV interface
via nautilus (linux file explorer) embedded WebDAV client. Only browsing is
functional at this point.
* I would like to commit this test framework (currently it doesn't have any
of my own code) into sandbox along with a README file so that anyone can
test it. But i need instructions on how to do it.
Please feel free to make comments and suggestions. I'm really sorry this
mail took so long, i was bit busy.
Thank you all.
- Asiri
Hi again,
During my search into LDAP code, I found that the xwiki.cfg check_level was
removed in the new XWikiLDAPAuthService that deprecate the LDAPAuthService.
It is a pity because for my pb I only need to check if the LDAP Bind is ok
or not to authenticate my user, and this works perfectly (except the
allocated XwikiGroup) with the old LDAP authentication mechanism.
Is it possible to re-add the check_level param in the current
XwikiLDAPAuthService ?
Fabien
It took me a while sorry but I think I've fixed it (building now). The
pb is that the new context module was not added in Continuum.
I had a problem with my user account there (I was locked out), that's
why it took me some time. Sorry.
Thanks
-Vincent
Hello,
I compiled the whole packages from trunk under Eclipse running with a
JDK1.6_06.
When I launch XWiki-Enterprise, it stops while instantiating Hibernate
Storage with an error "can't find web property in XWikiDocument"...
which is true because web is managed by get/setSpace...
I discovered the get/setWeb is provided for compatibility by an aspect...
So, I took a look at the compiled aspects and the generated .class were
really smaller than the one in a JAR from the repository...
After some unsucessful tries, in Eclipse, I decided to switch from java6.0
syntax to java5.0 and recompiled and then I got some .class which seemed
bigger... Then I launch XWiki and it now works...
Has anyone encountered the same problem?
regards
Pascal