Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
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
nexedi
converse.js
Commits
e786af72
Commit
e786af72
authored
Oct 25, 2017
by
Weblate
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
6c2f7c87
00f11149
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
9 deletions
+14
-9
CHANGES.md
CHANGES.md
+1
-0
src/converse-core.js
src/converse-core.js
+13
-9
No files found.
CHANGES.md
View file @
e786af72
...
...
@@ -4,6 +4,7 @@
### Bugfixes
-
Don't require
`auto_login`
to be
`true`
when using the API to log in.
-
Moment locale wasn't being set to the value passed via the
`i18n`
option.
### New Features
-
#828 Add routing for the
`#converse-login`
and
`#converse-register`
URL
...
...
src/converse-core.js
View file @
e786af72
...
...
@@ -155,27 +155,35 @@
},
console
);
if
(
level
===
Strophe
.
LogLevel
.
ERROR
)
{
if
(
_converse
.
debug
)
{
logger
.
trace
(
`ERROR:
${
message
}
`
);
logger
.
trace
(
`
${
moment
().
format
()}
ERROR:
${
message
}
`
);
}
else
{
logger
.
error
(
`ERROR:
${
message
}
`
);
}
}
else
if
(
level
===
Strophe
.
LogLevel
.
WARN
)
{
logger
.
warn
(
`WARNING:
${
message
}
`
);
if
(
_converse
.
debug
)
{
logger
.
warn
(
`
${
moment
().
format
()}
WARNING:
${
message
}
`
);
}
else
{
logger
.
warn
(
`WARNING:
${
message
}
`
);
}
}
else
if
(
level
===
Strophe
.
LogLevel
.
FATAL
)
{
if
(
_converse
.
debug
)
{
logger
.
trace
(
`FATAL:
${
message
}
`
);
logger
.
trace
(
`
${
moment
().
format
()}
FATAL:
${
message
}
`
);
}
else
{
logger
.
error
(
`FATAL:
${
message
}
`
);
}
}
else
if
(
_converse
.
debug
)
{
if
(
level
===
Strophe
.
LogLevel
.
DEBUG
)
{
logger
.
debug
(
`DEBUG:
${
message
}
`
);
logger
.
debug
(
`
${
moment
().
format
()}
DEBUG:
${
message
}
`
);
}
else
{
logger
.
info
(
`INFO:
${
message
}
`
);
logger
.
info
(
`
${
moment
().
format
()}
INFO:
${
message
}
`
);
}
}
};
Strophe
.
log
=
function
(
level
,
msg
)
{
_converse
.
log
(
level
+
'
'
+
msg
,
level
);
};
Strophe
.
error
=
function
(
msg
)
{
_converse
.
log
(
msg
,
Strophe
.
LogLevel
.
ERROR
);
};
_converse
.
__
=
function
(
str
)
{
/* Translate the given string based on the current locale.
*
...
...
@@ -250,10 +258,6 @@
unloadevent
=
'
unload
'
;
}
// Logging
Strophe
.
log
=
function
(
level
,
msg
)
{
_converse
.
log
(
level
+
'
'
+
msg
,
level
);
};
Strophe
.
error
=
function
(
msg
)
{
_converse
.
log
(
msg
,
Strophe
.
LogLevel
.
ERROR
);
};
// Instance level constants
this
.
TIMEOUTS
=
{
// Set as module attr so that we can override in tests.
'
PAUSED
'
:
10000
,
...
...
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