[logback-dev] [JIRA] Commented: (LBCORE-119) ReconfigureOnChangeFilter doesn't pick up changes if there are spaces in the filename

Anders Wallgren (JIRA) noreply-jira at qos.ch
Fri Sep 4 18:25:36 CEST 2009


    [ http://jira.qos.ch/browse/LBCORE-119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=11295#action_11295 ] 

Anders Wallgren commented on LBCORE-119:
----------------------------------------

* configure logback to use a file with spaces in the path name, for example, "C:\Documents and Settings\All Users\Application Data\foo\logback.xml" and set the "scan" attribute to true so it will look for changes to that file.
* ReconfigureOnChangeFilter gets the URL and converts it to a File.
* The filename will be C:\Documents%20Settings\All%20Users\Application%20Data\foo\logback.xml because the URL encoded the spaces in the filename.
* File doesn't support encoded filenames, so it doesn't think that filename exists, so file.lastModified always return 0 as the time stamp and changes to the file are never detected

The code needs to call URLDecoder.decode on the filename before creating the File object


> ReconfigureOnChangeFilter doesn't pick up changes if there are spaces in the filename
> -------------------------------------------------------------------------------------
>
>                 Key: LBCORE-119
>                 URL: http://jira.qos.ch/browse/LBCORE-119
>             Project: logback-core
>          Issue Type: Bug
>    Affects Versions: 0.9.17
>            Reporter: Anders Wallgren
>            Assignee: Ceki Gulcu
>
> ReconfigureOnChangeFilter.start doesn't unencode the URL encoding of spaces, so it will never detect changes since the url-encoded filename doesn't exist.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the logback-dev mailing list