Opened 13 years ago

Closed 13 years ago

#360 closed enhancement (fixed)

REQ: Channel Name in Log.

Reported by: szili_boy Owned by:
Priority: minor Component: General
Severity: medium Keywords:
Cc: Sensitive: no

Description

I have a request:

Why not display channel name in log (and in WebIF) of course if it is defined in oscam.srvid

An example is displayed bellow.

Instead of this:
[code]2010/01/15 14:27:04 2284 c01 cccam (1802&000000/041A/92:F0D8): found (294 ms) by reader0code

Should be this:
[code]2010/01/15 14:27:04 2284 c01 cccam (1802&000000/041A/92:F0D8) (Pro TV): found (294 ms) by reader0code

or this:
[code]2010/01/15 14:27:04 2284 c01 cccam (Pro TV): found (294 ms) by reader0code

Of cource this would be nice to toggle with a settings in oscam.conf

Something like this:
ServiceLog=0,1,2

0 = Current type (default)
1 = 1st variant proposed by me
2 = 2nd variant proposed by me

Change History (5)

comment:1 by szili_boy, 13 years ago

Sorry, not used right code tags.

I have a request:

Why not display channel name in log (and in WebIF) of course if it is defined in oscam.srvid

An example is displayed bellow.

Instead of this:

2010/01/15 14:27:04 2284 c01 cccam (1802&000000/041A/92:F0D8): found (294 ms) by reader0/

Should be this:

2010/01/15 14:27:04 2284 c01 cccam (1802&000000/041A/92:F0D8) (Pro TV): found (294 ms) by reader0

Or:

2010/01/15 14:27:04 2284 c01 cccam (Pro TV): found (294 ms) by reader0

Of cource this would be nice to toggle with a settings in oscam.conf
Something like this:

ServiceLog=0,1,2

where:

0 = Current type (default)
1 = 1st variant proposed by me
2 = 2nd variant proposed by me 

comment:2 by nightmann, 13 years ago

in my opinion this is a not really needed function. it would be slow down oscam a little bit.

comment:3 by alno, 13 years ago

I wouldn't do it too but if somebody do it -please disable by default

However - in module-monitor.c is a function to resolve the channelname only. If it becomes used outside of pure monitor usage this function should be moved to a more central point (simples or so)

char *monitor_get_srvname(int srvid, int caid){
	int i;
	struct s_srvid *this = cfg->srvid;
	static char name[83];

	for (name[0] = 0; this && (!name[0]); this = this->next)
		if (this->srvid == srvid)
			for (i=0; i<this->ncaid; i++)
				if (this->caid[i] == caid)
					strncpy(name, this->name, 32);

	if (!name[0]) sprintf(name, "[%04X:%04X]", caid, srvid);
	if (!srvid) name[0] = '\0';
	return(name);
}

comment:4 by szili_boy, 13 years ago

I know that it would slow down a bit. But implementing this not means that it should be enabled by default.

comment:5 by Deas, 13 years ago

Component: General
Resolution: fixed
Sensitive: unset
Status: newclosed
Note: See TracTickets for help on using tickets.