So, I'm building a light function using a logarithmic function, in this case a LOG15, In excel it gives me exactly what I need, a value from 0 to 255 based on an input of 1000 to 1.
It returns an error because a function node must return an object, also, I think you have x and y the wrong way round. Try this in a function node
// returns payload with log base 15 of incoming payload
msg.payload = baseLog(msg.payload, 15)
return msg;
// returns log of x base y
function baseLog(x, y) {
return Math.log(x) / Math.log(y);
}