Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
6734f4b2
Commit
6734f4b2
authored
Jan 08, 2006
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zLOG -> logging
parent
791ea4a9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
8 deletions
+11
-8
lib/python/AccessControl/cAccessControl.c
lib/python/AccessControl/cAccessControl.c
+5
-8
lib/python/AccessControl/logger_wrapper.py
lib/python/AccessControl/logger_wrapper.py
+6
-0
No files found.
lib/python/AccessControl/cAccessControl.c
View file @
6734f4b2
...
@@ -658,8 +658,7 @@ static PyExtensionClass imPermissionRoleType = {
...
@@ -658,8 +658,7 @@ static PyExtensionClass imPermissionRoleType = {
static
PyObject
*
Containers
=
NULL
;
static
PyObject
*
Containers
=
NULL
;
static
PyObject
*
ContainerAssertions
=
NULL
;
static
PyObject
*
ContainerAssertions
=
NULL
;
static
PyObject
*
Unauthorized
=
NULL
;
static
PyObject
*
Unauthorized
=
NULL
;
static
PyObject
*
LOG
=
NULL
;
static
PyObject
*
warn
=
NULL
;
static
PyObject
*
PROBLEM
=
NULL
;
static
PyObject
*
NoSequenceFormat
=
NULL
;
static
PyObject
*
NoSequenceFormat
=
NULL
;
static
PyObject
*
_what_not_even_god_should_do
=
NULL
;
static
PyObject
*
_what_not_even_god_should_do
=
NULL
;
static
PyObject
*
Anonymous
=
NULL
;
static
PyObject
*
Anonymous
=
NULL
;
...
@@ -1052,8 +1051,7 @@ static PyObject *ZopeSecurityPolicy_validate(PyObject *self, PyObject *args) {
...
@@ -1052,8 +1051,7 @@ static PyObject *ZopeSecurityPolicy_validate(PyObject *self, PyObject *args) {
m
=
PyObject_Repr
(
roles
);
m
=
PyObject_Repr
(
roles
);
if
(
m
)
ASSIGN
(
m
,
Py_BuildValue
(
"OO"
,
m
,
name
));
if
(
m
)
ASSIGN
(
m
,
Py_BuildValue
(
"OO"
,
m
,
name
));
if
(
m
)
ASSIGN
(
m
,
PyString_Format
(
NoSequenceFormat
,
m
));
if
(
m
)
ASSIGN
(
m
,
PyString_Format
(
NoSequenceFormat
,
m
));
if
(
m
)
ASSIGN
(
m
,
PyObject_CallFunction
(
LOG
,
"sOO"
,
if
(
m
)
ASSIGN
(
m
,
PyObject_CallFunction
(
warn
,
"O"
,
m
));
"Zope Security Policy"
,
PROBLEM
,
m
));
Py_XDECREF
(
m
);
Py_XDECREF
(
m
);
PyErr_Restore
(
t
,
v
,
tb
);
PyErr_Restore
(
t
,
v
,
tb
);
goto
err
;
goto
err
;
...
@@ -2176,7 +2174,7 @@ module_guarded_getattr(PyObject *ignored, PyObject *args)
...
@@ -2176,7 +2174,7 @@ module_guarded_getattr(PyObject *ignored, PyObject *args)
static
PyObject
*
static
PyObject
*
module_aq_validate
(
PyObject
*
ignored
,
PyObject
*
args
)
module_aq_validate
(
PyObject
*
ignored
,
PyObject
*
args
)
{
{
PyObject
*
inst
,
*
obj
,
*
name
,
*
v
,
*
validate
;
PyObject
*
inst
=
NULL
,
*
obj
=
NULL
,
*
name
=
NULL
,
*
v
=
NULL
,
*
validate
=
NULL
;
if
(
unpacktuple5
(
args
,
"validate"
,
0
,
if
(
unpacktuple5
(
args
,
"validate"
,
0
,
&
inst
,
&
obj
,
&
name
,
&
v
,
&
validate
)
<
0
)
return
NULL
;
&
inst
,
&
obj
,
&
name
,
&
v
,
&
validate
)
<
0
)
return
NULL
;
...
@@ -2331,9 +2329,8 @@ void initcAccessControl(void) {
...
@@ -2331,9 +2329,8 @@ void initcAccessControl(void) {
/*| from zLOG import LOG, PROBLEM
/*| from zLOG import LOG, PROBLEM
*/
*/
IMPORT
(
module
,
"zLOG"
);
IMPORT
(
module
,
"logger_wrapper"
);
GETATTR
(
module
,
LOG
);
GETATTR
(
module
,
warn
);
GETATTR
(
module
,
PROBLEM
);
Py_DECREF
(
module
);
Py_DECREF
(
module
);
module
=
NULL
;
module
=
NULL
;
}
}
...
...
lib/python/AccessControl/logger_wrapper.py
0 → 100644
View file @
6734f4b2
# A wrapper to replace the usage of the zLOG module in cAccessControl without
# having the need to change the C code significantly.
from
logging
import
getLogger
LOG
=
getLogger
(
'AccessControl'
)
warn
=
LOG
.
warn
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment