mirror of
https://github.com/azures04/crafatar.git
synced 2026-03-21 23:41:18 +01:00
improve logging
This commit is contained in:
parent
7ca43e3cd9
commit
3cdcccde57
@ -98,7 +98,7 @@ exp.info = function(callback) {
|
||||
// these 60 seconds match the duration of Mojang's rate limit ban
|
||||
// callback: error
|
||||
exp.update_timestamp = function(rid, userId, hash, temp, callback) {
|
||||
logging.log(rid, "cache: updating timestamp");
|
||||
logging.debug(rid, "updating cache timestamp");
|
||||
var sub = temp ? (config.local_cache_time - 60) : 0;
|
||||
var time = Date.now() - sub;
|
||||
// store userId in lower case if not null
|
||||
@ -114,7 +114,7 @@ exp.update_timestamp = function(rid, userId, hash, temp, callback) {
|
||||
// this feature can be used to write both cape and skin at separate times
|
||||
// +callback+ contans error
|
||||
exp.save_hash = function(rid, userId, skin_hash, cape_hash, callback) {
|
||||
logging.log(rid, "cache: saving skin:" + skin_hash + " cape:" + cape_hash);
|
||||
logging.debug(rid, "caching skin:" + skin_hash + " cape:" + cape_hash);
|
||||
var time = Date.now();
|
||||
// store shorter null byte instead of "null"
|
||||
skin_hash = (skin_hash === null ? "" : skin_hash);
|
||||
@ -138,7 +138,7 @@ exp.save_hash = function(rid, userId, skin_hash, cape_hash, callback) {
|
||||
|
||||
// removes the hash for +userId+ from the cache
|
||||
exp.remove_hash = function(rid, userId) {
|
||||
logging.log(rid, "cache: deleting hash");
|
||||
logging.log(rid, "deleting hash from cache");
|
||||
redis.del(userId.toLowerCase(), "h", "t");
|
||||
};
|
||||
|
||||
|
||||
@ -52,7 +52,6 @@ module.exports = function(req, callback) {
|
||||
|
||||
// strip dashes
|
||||
userId = userId.replace(/-/g, "");
|
||||
logging.debug(req.id, "userid:", userId);
|
||||
|
||||
try {
|
||||
helpers.get_avatar(req.id, userId, helm, size, function(err, status, image, hash) {
|
||||
|
||||
@ -72,7 +72,6 @@ module.exports = function(req, callback) {
|
||||
|
||||
// strip dashes
|
||||
userId = userId.replace(/-/g, "");
|
||||
logging.debug(rid, "userId:", userId);
|
||||
|
||||
try {
|
||||
helpers.get_render(rid, userId, scale, helm, body, function(err, status, hash, image) {
|
||||
|
||||
@ -50,7 +50,6 @@ module.exports = function(req, callback) {
|
||||
|
||||
// strip dashes
|
||||
userId = userId.replace(/-/g, "");
|
||||
logging.debug(rid, "userid:", userId);
|
||||
|
||||
try {
|
||||
helpers.get_skin(rid, userId, function(err, hash, status, image) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user