You are here: Foswiki>Tasks Web>Item12674 (03 Jan 2014, GeorgeClark)Edit Attach

Item12674: PlainFile logger fails when {Site}{CharSet} is not set

pencil
Priority: Urgent
Current State: Closed
Released In: n/a
Target Release: n/a
Applies To: Engine
Component: FoswikiLogger
Branches: trunk
Reported By: CrawfordCurrie
Waiting For:
Last Change By: GeorgeClark
Line 116 of Logger/PlainFile.pm - requires {Site}{CharSet} to be non-empty. The default for a new config is empty.

-- CrawfordCurrie - 03 Dec 2013

The checker: Foswiki::Configure::Checkers::Site::CharSet defaults it so it should always be defined. We can jigger the logger, but are there other dependencies that assume a charset?

-- GeorgeClark - 03 Dec 2013

Checkers check; they should not be relied on to set. For one thing, there are no guarantees as to the evaluation order of checkers. If a checker sets a default, it's a bad hack - defaults come from Foswiki.spec (or in the worst case from Pluggables, though I want to reduce their prominence.)

I'm not aware of any other dependencies - I couldn't get beyond this one. There are certainly none in standard core, because it has a backup (site charset defaults to iso-8859-1)

I just found another dependency - one of the logger checkers assumes a query is set, which obviously prevents it being used in a non-CGI environment.

-- CrawfordCurrie - 04 Dec 2013

Well, that checker for Site::CharSet was added back in distro:cd9c3f9d9014, by some guy, CrawfordCurrie. smile

-- GeorgeClark - 04 Dec 2013

Hey, I never claimed to be perfect smile I'm just saying that what I did was wrong. That sort of hack needs removing.

-- CrawfordCurrie - 05 Dec 2013

 

ItemTemplate edit

Summary PlainFile logger fails when {Site}{CharSet} is not set
ReportedBy CrawfordCurrie
Codebase trunk
SVN Range
AppliesTo Engine
Component FoswikiLogger
Priority Urgent
CurrentState Closed
WaitingFor
Checkins distro:da5299966d87
TargetRelease n/a
ReleasedIn n/a
CheckinsOnBranches trunk
trunkCheckins distro:da5299966d87
Release01x01Checkins
Topic revision: r7 - 03 Jan 2014, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy